mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/3] ubiformat: fix the subpage size hint on the error path
Date: Thu, 10 Dec 2015 11:07:24 +0100	[thread overview]
Message-ID: <1449742046-20906-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1449742046-20906-1-git-send-email-s.hauer@pengutronix.de>

From mtd-utils commit:

| commit 15685fe39f1665d53d8b316c8f837f20f8700d4b
| Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| Date:   Mon Sep 8 15:05:54 2014 +0300
|
|     ubiformat: fix the subpage size hint on the error path
|
|     David Binderman <dcb314@hotmail.com> reports that the following piece of looks
|     wrong:
|
|     if (!args.subpage_size != mtd->min_io_size)
|         normsg("may be sub-page size is incorrect?");
|
|     I totally agree with him and I believe that we actually meant to have no
|     negation in fron to f 'args.subpage_size', so instead, the code should look
|     like this:
|
|     if (args.subpage_size != mtd->min_io_size)
|         normsg("may be sub-page size is incorrect?");
|
|     Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/ubiformat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index 8516e11..f9c50b7 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -503,9 +503,8 @@ static int format(const struct mtd_dev_info *mtd,
 				   write_size, eb);
 
 			if (errno != EIO) {
-				if (!args.subpage_size != mtd->min_io_size)
-					normsg("may be sub-page size is "
-					       "incorrect?");
+				if (args.subpage_size != mtd->min_io_size)
+					normsg("may be sub-page size is incorrect?");
 				goto out_free;
 			}
 
-- 
2.6.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-12-10 10:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 10:07 Fix some gcc5 warnings Sascha Hauer
2015-12-10 10:07 ` Sascha Hauer [this message]
2015-12-10 10:07 ` [PATCH 2/3] linux/barebox-wrapper: Silence gcc5 warning Sascha Hauer
2015-12-10 19:23   ` Trent Piepho
2015-12-11  7:12     ` Sascha Hauer
2015-12-10 10:07 ` [PATCH 3/3] ARM: Omap3: Remove useless inline Sascha Hauer

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=1449742046-20906-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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