[PATCH 1/3] ubiformat: fix the subpage size hint on the error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From mtd-utils commit:

| commit 15685fe39f1665d53d8b316c8f837f20f8700d4b
| Author: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
| Date:   Mon Sep 8 15:05:54 2014 +0300
|
|     ubiformat: fix the subpage size hint on the error path
|
|     David Binderman <dcb314@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxx>

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux