linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Roy Zang <tie-fei.zang@freescale.com>
Cc: dwmw2@infradead.org, akpm@linux-foundation.org,
	linux-mtd@lists.infradead.org, cbouatmailru@gmail.com
Subject: Re: [PATCH] mtd: fix the build warning for fsl_upm.c
Date: Wed, 08 Sep 2010 11:46:28 +0300	[thread overview]
Message-ID: <1283935588.2979.62.camel@localhost> (raw)
In-Reply-To: <1283917561-13930-1-git-send-email-tie-fei.zang@freescale.com>

On Wed, 2010-09-08 at 11:46 +0800, Roy Zang wrote:
> Fix the build warning:
> 
> drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init':
> drivers/mtd/nand/fsl_upm.c:190: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
> 
> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> ---
>  drivers/mtd/nand/fsl_upm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
> index 4eff8b2..dc61ecf 100644
> --- a/drivers/mtd/nand/fsl_upm.c
> +++ b/drivers/mtd/nand/fsl_upm.c
> @@ -186,8 +186,8 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
>  	if (!flash_np)
>  		return -ENODEV;
>  
> -	fun->mtd.name = kasprintf(GFP_KERNEL, "%x.%s", io_res->start,
> -				  flash_np->name);
> +	fun->mtd.name = kasprintf(GFP_KERNEL, "%x.%s", 
> +			(unsigned int)io_res->start, flash_np->name);

No, you should use %llx and (u64) cast since resourse_size_t can be
anything up to u64.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2010-09-08  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08  3:46 [PATCH] mtd: fix the build warning for fsl_upm.c Roy Zang
2010-09-08  8:46 ` Artem Bityutskiy [this message]
2010-09-08  9:10   ` Zang Roy-R61911

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=1283935588.2979.62.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cbouatmailru@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tie-fei.zang@freescale.com \
    /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).