public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: tests: fix '&&' and '||' warning
@ 2011-07-20 16:53 Brian Norris
  2011-07-20 16:53 ` [PATCH 2/2] mtd: spelling fixes Brian Norris
  2011-07-22  8:16 ` [PATCH 1/2] mtd: tests: fix '&&' and '||' warning Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2011-07-20 16:53 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Brian Norris, linux-mtd

Commit 3db343a094c876efc64a267a6968cfd5a6f93965
("mtd: tests: ignore corrected bitflips in OOB on mtd_readtest")
introduces a compiler warning:

  CC [M]  drivers/mtd/tests/mtd_readtest.o
  drivers/mtd/tests/mtd_readtest.c: In function ‘read_eraseblock_by_page’:
  drivers/mtd/tests/mtd_readtest.c:79: warning: suggest parentheses around ‘&&’ within ‘||’

[Note: the commit hash above is only valid if l2-mtd-2.6 is not rebased
too much. You can just squash this patch into the commit that produced
this warning if you'd like.]

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/tests/mtd_readtest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c
index de23e8e..836792d 100644
--- a/drivers/mtd/tests/mtd_readtest.c
+++ b/drivers/mtd/tests/mtd_readtest.c
@@ -75,7 +75,7 @@ static int read_eraseblock_by_page(int ebnum)
 			ops.datbuf    = NULL;
 			ops.oobbuf    = oobbuf;
 			ret = mtd->read_oob(mtd, addr, &ops);
-			if (ret && ret != -EUCLEAN ||
+			if ((ret && ret != -EUCLEAN) ||
 					ops.oobretlen != mtd->oobsize) {
 				printk(PRINT_PREF "error: read oob failed at "
 						  "%#llx\n", (long long)addr);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-22  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 16:53 [PATCH 1/2] mtd: tests: fix '&&' and '||' warning Brian Norris
2011-07-20 16:53 ` [PATCH 2/2] mtd: spelling fixes Brian Norris
2011-07-22  8:16 ` [PATCH 1/2] mtd: tests: fix '&&' and '||' warning Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox