From: Artem Bityutskiy <dedekind1@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org
Subject: Re: [patch] mtd: silence compile warning
Date: Thu, 08 Apr 2010 11:14:51 +0300 [thread overview]
Message-ID: <1270714491.6754.99.camel@localhost> (raw)
In-Reply-To: <20100322115819.GA21571@bicker>
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 (Артём Битюцкий)
prev parent reply other threads:[~2010-04-08 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 12:02 [patch] mtd: silence compile warning Dan Carpenter
2010-04-08 8:14 ` Artem Bityutskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270714491.6754.99.camel@localhost \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).