mtd: silence compile warning
Subsystems (2)
PATCH 1/1 mtd: silence compile warning
This gets rid of a compile warning:drivers/mtd/maps/dmv182.c:120: warning: format ‘%d’ expects type
‘int’, but argument 2 has type ‘uint64_t’
Signed-off-by Dan Carpenter <[email protected]>
drivers/mtd/maps/dmv182.c +1 -1
@@ -116,7 +116,7 @@ static int __init init_svme182(void)return -ENXIO ; } -printk (KERN_NOTICE "SVME182 flash device: %dMiB at 0x%08x\n" , +printk (KERN_NOTICE "SVME182 flash device: %lldMiB at 0x%08x\n" , this_mtd->size >>20 ,FLASH_BASE_ADDR ); this_mtd->owner =THIS_MODULE ;
Quoted 11 lines · Dan Carpenter
This gets rid of a compile warning:
drivers/mtd/maps/dmv182.c:120: warning: format ‘%d’ expects type
‘int’, but argument 2 has type ‘uint64_t’Signed-off-by Dan Carpenter <[email protected]>drivers/mtd/maps/dmv182.c +0
-0
drivers/mtd/maps/dmv182.c static int __init init_svme182(void) · line 120
Quoted 6 lines
drivers/mtd/maps/dmv182.c +1
-1@@ -116,7 +116,7 @@ static int __init init_svme182(void)return -ENXIO ; } -printk (KERN_NOTICE "SVME182 flash device: %dMiB at 0x%08x\n" , +printk (KERN_NOTICE "SVME182 flash device: %lldMiB at 0x%08x\n" , this_mtd->size >>20 ,FLASH_BASE_ADDR );
%lld is also wrong for uint64_t, I think on PPC it'll result in a warning. Instead, I'd use %llu and then a cast:
(unsigned long long)(this_mtd->size >> 20)
Signature · 2 lines
Best Regards, Artem Bityutskiy (Артём Битюцкий)