* [patch] mtd: silence compile warning
@ 2010-03-22 12:02 Dan Carpenter
2010-04-08 8:14 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-03-22 12:02 UTC (permalink / raw)
To: David Woodhouse; +Cc: kernel-janitors, linux-mtd
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 <error27@gmail.com>
diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c
index d171674..680ba2d 100644
--- a/drivers/mtd/maps/dmv182.c
+++ b/drivers/mtd/maps/dmv182.c
@@ -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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] mtd: silence compile warning
2010-03-22 12:02 [patch] mtd: silence compile warning Dan Carpenter
@ 2010-04-08 8:14 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-04-08 8:14 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kernel-janitors, David Woodhouse, linux-mtd
On Mon, 2010-03-22 at 15:02 +0300, Dan Carpenter wrote:
> 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 <error27@gmail.com>
>
> diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c
> index d171674..680ba2d 100644
> --- a/drivers/mtd/maps/dmv182.c
> +++ b/drivers/mtd/maps/dmv182.c
> @@ -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)
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-08 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 12:02 [patch] mtd: silence compile warning Dan Carpenter
2010-04-08 8:14 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).