public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Xiubo Li <Li.Xiubo@freescale.com>
Cc: wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	s.hauer@pengutronix.de, jg1.han@samsung.com,
	u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org,
	b35083@freescale.com
Subject: Re: [PATCH] i2c: i2c-imx: Fix format warning for dev_dbg
Date: Tue, 05 Aug 2014 20:09:57 -0700	[thread overview]
Message-ID: <1407294597.31231.2.camel@joe-AO725> (raw)
In-Reply-To: <1407293685-7003-1-git-send-email-Li.Xiubo@freescale.com>

On Wed, 2014-08-06 at 10:54 +0800, Xiubo Li wrote:
> drivers/i2c/busses/i2c-imx.c: In function i2c_imx_probe()
> drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument
> of type unsigned int, but argument 4 has type resource_size_t [-Wformat=]
>   dev_dbg(&i2c_imx->adapter.dev, "device resources from 0x%x to 0x%x\n",
[]
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
[]
> @@ -687,9 +687,9 @@ static int i2c_imx_probe(struct platform_device *pdev)
>  
>  	dev_dbg(&i2c_imx->adapter.dev, "claimed irq %d\n", irq);
>  	dev_dbg(&i2c_imx->adapter.dev, "device resources from 0x%x to 0x%x\n",
> -		res->start, res->end);
> +		(unsigned int)res->start, (unsigned int)res->end);

Probably better to use:

	dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n, res);

>  	dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n",
> -		resource_size(res), res->start);
> +		(unsigned int)resource_size(res), (unsigned int)res->start);

and remove this.

  reply	other threads:[~2014-08-06  3:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  2:54 [PATCH] i2c: i2c-imx: Fix format warning for dev_dbg Xiubo Li
2014-08-06  3:09 ` Joe Perches [this message]
2014-08-06  3:28   ` Li.Xiubo

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=1407294597.31231.2.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=Li.Xiubo@freescale.com \
    --cc=b35083@freescale.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa@the-dreams.de \
    /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