public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Brian Norris" <computersforpeace@gmail.com>
To: "Artem Bityutskiy" <dedekind1@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org
Subject: [PATCH 1/2] mtd: tests: fix '&&' and '||' warning
Date: Wed, 20 Jul 2011 09:53:41 -0700	[thread overview]
Message-ID: <1311180822-6226-1-git-send-email-computersforpeace@gmail.com> (raw)

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

             reply	other threads:[~2011-07-20 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 16:53 Brian Norris [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311180822-6226-1-git-send-email-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox