From: "Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com>
To: Joe Perches <joe@perches.com>
Cc: "wsa@the-dreams.de" <wsa@the-dreams.de>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"jg1.han@samsung.com" <jg1.han@samsung.com>,
"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jingchang Lu <jingchang.lu@freescale.com>
Subject: RE: [PATCH] i2c: i2c-imx: Fix format warning for dev_dbg
Date: Wed, 6 Aug 2014 03:28:23 +0000 [thread overview]
Message-ID: <665de450db8e4edd8c76ce7175106b0d@BY2PR0301MB0613.namprd03.prod.outlook.com> (raw)
In-Reply-To: <1407294597.31231.2.camel@joe-AO725>
> > 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);
>
Yes, this is perfect.
> > 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.
>
I will follow your advice.
Thanks,
BRs
Xiubo
prev parent reply other threads:[~2014-08-06 3:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 2:54 Xiubo Li
2014-08-06 3:09 ` Joe Perches
2014-08-06 3:28 ` Li.Xiubo [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=665de450db8e4edd8c76ce7175106b0d@BY2PR0301MB0613.namprd03.prod.outlook.com \
--to=li.xiubo@freescale.com \
--cc=jg1.han@samsung.com \
--cc=jingchang.lu@freescale.com \
--cc=joe@perches.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
all inboxes | Powered by JetHome®