Patchwork MTD: UBI: remove superfluous "!!" operation

login
register
mail settings
Submitter Richard Weinberger
Date May 7, 2012, 10:47 p.m.
Message ID <1336430840-27232-1-git-send-email-richard@nod.at>
Download mbox | patch
Permalink /patch/157487/
State New
Headers show

Comments

Richard Weinberger - May 7, 2012, 10:47 p.m.
!!(x < y) and (x < y) are identical expressions.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/ubi/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Weinberger - May 8, 2012, 7:31 a.m.
Am 08.05.2012 09:32, schrieb Artem Bityutskiy:
> Since you are submitting often, you may save me a bit of editing if you
> prefix UBI patches with just "UBI:" :-) But I do not mind amending
> patches if you don't.
> 

Will do. :)

Thanks,
//richard
Artem Bityutskiy - May 8, 2012, 7:32 a.m.
On Tue, 2012-05-08 at 00:47 +0200, Richard Weinberger wrote:
> !!(x < y) and (x < y) are identical expressions.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>

Thanks, pushed to l2-mtd.git.

Since you are submitting often, you may save me a bit of editing if you
prefix UBI patches with just "UBI:" :-) But I do not mind amending
patches if you don't.

Thanks!

Patch

diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 12c43b4..8d24435 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -337,7 +337,7 @@  static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
 	}
 
 	/* Obviously the LEB with lower sequence counter is older */
-	second_is_newer = !!(sqnum2 > seb->sqnum);
+	second_is_newer = (sqnum2 > seb->sqnum);
 
 	/*
 	 * Now we know which copy is newer. If the copy flag of the PEB with