Message ID | 1410178188.10764.159.camel@sauron.fi.intel.com |
---|---|
State | Accepted |
Headers | show |
On Mon, 2014-09-08 at 15:09 +0300, Artem Bityutskiy wrote: > On Sun, 2014-09-07 at 14:58 +0000, David Binderman wrote: > > Hello there, > > > > ubi-utils/ubiformat.c:636:28: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] > > > > if (!args.subpage_size != mtd->min_io_size) > > normsg("may be sub-page size is " > > "incorrect?"); > > Hi, > > I'd propose this patch to fix the issue: > > Subject: [PATCH] ubiformat: fix the subpage size hint on the error path I've just pushed this patch to mtd-utils.git. I did not test it, but hopefully it is trivial enough and not so risky since it changes the error path.
diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c index 1b8f6fb..21409ca 100644 --- a/ubi-utils/ubiformat.c +++ b/ubi-utils/ubiformat.c @@ -633,9 +633,8 @@ static int format(libmtd_t libmtd, 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; }