diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-14 01:15:39 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-14 01:47:49 -0400 |
commit | f5d5b1f8c12a7637ee1145f2f00358eb375edb54 (patch) | |
tree | 5d4b5ec5ef6eba5fb0f5cc1e5127115da33c2759 /drivers/mtd/ubi/scan.c | |
parent | 095751a6e0838a712393a74eb0b7b6559dbdbe81 (diff) |
UBI: fix error message and compilation warnings
Fix the followong compilation warnings introduced by commit
095751a6e0838a712393a74eb0b7b6559dbdbe81:
drivers/mtd/ubi/scan.c: In function 'check_what_we_have':
drivers/mtd/ubi/scan.c:960: warning: passing argument 1 of 'get_random_bytes' discards qualifiers from pointer target type
Fix the following compilation warnings introduced by commit
1a49af2ca019dcb4614c32f832bbcb814b61409c:
drivers/mtd/ubi/io.c: In function 'ubi_io_read':
drivers/mtd/ubi/io.c:153: warning: initialization makes integer from pointer without a cast
drivers/mtd/ubi/io.c:170: warning: format '%s' expects type 'char *', but argument 5 has type 'int'
drivers/mtd/ubi/io.c:177: warning: format '%zd' expects type 'signed size_t', but argument 7 has type 'int'
drivers/mtd/ubi/io.c:177: warning: too many arguments for format
Also, amend the ECC error code string and add brackets and whitespace
there - this should make the message readable.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index de7b2f1c4113..37855e55651f 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -901,8 +901,7 @@ adjust_mean_ec: | |||
901 | * MTD device. Returns zero if we should proceed with attaching the MTD device, | 901 | * MTD device. Returns zero if we should proceed with attaching the MTD device, |
902 | * and %-EINVAL if we should not. | 902 | * and %-EINVAL if we should not. |
903 | */ | 903 | */ |
904 | static int check_what_we_have(const struct ubi_device *ubi, | 904 | static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si) |
905 | struct ubi_scan_info *si) | ||
906 | { | 905 | { |
907 | struct ubi_scan_leb *seb; | 906 | struct ubi_scan_leb *seb; |
908 | int max_corr; | 907 | int max_corr; |