mtd: fix compiler warnings
authorSteve Rae <steve.rae@raedomain.com>
Wed, 29 Jun 2016 20:50:59 +0000 (13:50 -0700)
committerScott Wood <oss@buserror.net>
Mon, 25 Jul 2016 01:36:29 +0000 (20:36 -0500)
- add missing declaration
- update debug output format specifiers

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
cmd/mtdparts.c
include/linux/mtd/mtd.h

index 3f4f334..b9b160d 100644 (file)
@@ -1493,7 +1493,7 @@ static int spread_partitions(void)
                        part = list_entry(pentry, struct part_info, link);
 
                        debug("spread_partitions: device = %s%d, partition %d ="
-                               " (%s) 0x%08x@0x%08x\n",
+                               " (%s) 0x%08llx@0x%08llx\n",
                                MTD_DEV_TYPE(dev->id->type), dev->id->num,
                                part_num, part->name, part->size,
                                part->offset);
@@ -2025,7 +2025,7 @@ static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,
 
                if (!strcmp(&argv[1][3], ".spread")) {
                        spread_partition(mtd, p, &next_offset);
-                       debug("increased %s to %d bytes\n", p->name, p->size);
+                       debug("increased %s to %llu bytes\n", p->name, p->size);
                }
 #endif
 
index cf20674..779eea0 100644 (file)
@@ -500,5 +500,10 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
 int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
                     loff_t *size, loff_t *maxsize, int devtype,
                     uint64_t chipsize);
+
+/* drivers/mtd/mtdcore.c */
+void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
+                         const uint64_t length, uint64_t *len_incl_bad,
+                         int *truncated);
 #endif
 #endif /* __MTD_MTD_H__ */