UBI: fix warnings when debugging is enabled
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 12 Nov 2008 08:14:10 +0000 (10:14 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 3 Dec 2008 14:34:23 +0000 (16:34 +0200)
commit6b13daaced663f65b67a40366e3c0d3d534ce7fb
treed97337607e50437df58356fb1c2bef81efa161f5
parentc7d30e5697d05608d65f431cbe8abe3e498470c2
UBI: fix warnings when debugging is enabled

The 'ubi_io_read_vid_hdr()' and 'ubi_io_read_ec_hdr()' function
have the 'verbose' argument which controls whether they should
print a warning if the VID/EC header was not found or was corrupted.
Some callers require the headers to be OK, and pass 1. Some allow
a corrupted/not present header, and pass 0.

       if (UBI_IO_DEBUG)
               verbose = 1;

And UBI_IO_DEBUG is 1 if CONFIG_MTD_UBI_DEBUG_MSG_BLD is true. So in
this case the warning is printed all the time. This confuses people.

Thus, do not print the messages as warnings if UBI_IO_DEBUG is true,
but print them as debugging messages instead.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/io.c