* [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg @ 2014-08-06 3:45 Xiubo Li [not found] ` <1407296708-12563-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Xiubo Li @ 2014-08-06 3:45 UTC (permalink / raw) To: wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ Cc: s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ, jg1.han-Sze3O3UU22JBDgjK7y7TUQ, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, b35083-KZfg59tc24xl57MIdRCFDg, Xiubo Li 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", ^ drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] drivers/i2c/busses/i2c-imx.c:691:2: warning: format %d expects argument of type int, but argument 4 has type resource_size_t [-Wformat=] dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", ^ drivers/i2c/busses/i2c-imx.c:691:2: warning: format 0x%x expects argument of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- Change in v2: - Follow Joe Perches's advice. drivers/i2c/busses/i2c-imx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 1d7efa3..b8a9543 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -686,10 +686,7 @@ static int i2c_imx_probe(struct platform_device *pdev) clk_disable_unprepare(i2c_imx->clk); 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); - dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", - resource_size(res), res->start); + dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res); dev_dbg(&i2c_imx->adapter.dev, "adapter name: \"%s\"\n", i2c_imx->adapter.name); dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); -- 1.8.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1407296708-12563-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg [not found] ` <1407296708-12563-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2014-08-06 4:23 ` Jingoo Han [not found] ` <002801cfb12e$36620840$a32618c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-08-06 19:00 ` Wolfram Sang 1 sibling, 1 reply; 4+ messages in thread From: Jingoo Han @ 2014-08-06 4:23 UTC (permalink / raw) To: 'Xiubo Li' Cc: wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, b35083-KZfg59tc24xl57MIdRCFDg, 'Jingoo Han' On Wednesday, August 06, 2014 12:45 PM, Xiubo Li wrote: The subject of the commit looks too general. How about the following? i2c: i2c-imx: Use printf extension %pR for struct resource Best regards, Jingoo Han > > 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", > ^ > drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > drivers/i2c/busses/i2c-imx.c:691:2: warning: format %d expects argument > of type int, but argument 4 has type resource_size_t [-Wformat=] > dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", > ^ > drivers/i2c/busses/i2c-imx.c:691:2: warning: format 0x%x expects argument > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > --- > > Change in v2: > - Follow Joe Perches's advice. > > > > > > drivers/i2c/busses/i2c-imx.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index 1d7efa3..b8a9543 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -686,10 +686,7 @@ static int i2c_imx_probe(struct platform_device *pdev) > clk_disable_unprepare(i2c_imx->clk); > > 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); > - dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", > - resource_size(res), res->start); > + dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res); > dev_dbg(&i2c_imx->adapter.dev, "adapter name: \"%s\"\n", > i2c_imx->adapter.name); > dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); > -- > 1.8.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <002801cfb12e$36620840$a32618c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* RE: [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg [not found] ` <002801cfb12e$36620840$a32618c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> @ 2014-08-06 5:09 ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg 0 siblings, 0 replies; 4+ messages in thread From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-06 5:09 UTC (permalink / raw) To: Jingoo Han Cc: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jingchang Lu Hi Jingoo, Thanks for your advice. This patch is mainly resolving the warning issue. And some thing like : 'i2c: i2c-imx: Fix format warning for dev_db' Could be more obvious. I think adding 'printf extension %pR for struct resource' to the commit comment will better. BRs Xiubo > -----Original Message----- > From: Jingoo Han [mailto:jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org] > Sent: Wednesday, August 06, 2014 12:24 PM > To: Xiubo Li-B47053 > Cc: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org; linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org; > s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org; u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org; linux- > kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Lu Jingchang-B35083; 'Jingoo Han' > Subject: Re: [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg > > On Wednesday, August 06, 2014 12:45 PM, Xiubo Li wrote: > > The subject of the commit looks too general. > How about the following? > > i2c: i2c-imx: Use printf extension %pR for struct resource > > Best regards, > Jingoo Han > > > > > 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", > > ^ > > drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument > > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > > > drivers/i2c/busses/i2c-imx.c:691:2: warning: format %d expects argument > > of type int, but argument 4 has type resource_size_t [-Wformat=] > > dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", > > ^ > > drivers/i2c/busses/i2c-imx.c:691:2: warning: format 0x%x expects argument > > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > > > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > --- > > > > Change in v2: > > - Follow Joe Perches's advice. > > > > > > > > > > > > drivers/i2c/busses/i2c-imx.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > > index 1d7efa3..b8a9543 100644 > > --- a/drivers/i2c/busses/i2c-imx.c > > +++ b/drivers/i2c/busses/i2c-imx.c > > @@ -686,10 +686,7 @@ static int i2c_imx_probe(struct platform_device *pdev) > > clk_disable_unprepare(i2c_imx->clk); > > > > 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); > > - dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", > > - resource_size(res), res->start); > > + dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res); > > dev_dbg(&i2c_imx->adapter.dev, "adapter name: \"%s\"\n", > > i2c_imx->adapter.name); > > dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); > > -- > > 1.8.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg [not found] ` <1407296708-12563-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-08-06 4:23 ` Jingoo Han @ 2014-08-06 19:00 ` Wolfram Sang 1 sibling, 0 replies; 4+ messages in thread From: Wolfram Sang @ 2014-08-06 19:00 UTC (permalink / raw) To: Xiubo Li Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ, jg1.han-Sze3O3UU22JBDgjK7y7TUQ, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, b35083-KZfg59tc24xl57MIdRCFDg [-- Attachment #1: Type: text/plain, Size: 1003 bytes --] On Wed, Aug 06, 2014 at 11:45:08AM +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", > ^ > drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > drivers/i2c/busses/i2c-imx.c:691:2: warning: format %d expects argument > of type int, but argument 4 has type resource_size_t [-Wformat=] > dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x\n", > ^ > drivers/i2c/busses/i2c-imx.c:691:2: warning: format 0x%x expects argument > of type unsigned int, but argument 5 has type resource_size_t [-Wformat=] > > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Applied to for-next, thanks! [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-06 19:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-06 3:45 [PATCHv2] i2c: i2c-imx: Fix format warning for dev_dbg Xiubo Li [not found] ` <1407296708-12563-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-08-06 4:23 ` Jingoo Han [not found] ` <002801cfb12e$36620840$a32618c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-08-06 5:09 ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg 2014-08-06 19:00 ` Wolfram Sang
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).