lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 6 Aug 2014 03:28:23 +0000
From:	"Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
To:	Joe Perches <joe@...ches.com>
CC:	"wsa@...-dreams.de" <wsa@...-dreams.de>,
	"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
	"jg1.han@...sung.com" <jg1.han@...sung.com>,
	"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jingchang Lu <jingchang.lu@...escale.com>
Subject: RE: [PATCH] i2c: i2c-imx: Fix format warning for dev_dbg

> > 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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ