Re: [PATCH] i2c: i2c-imx: Fix format warning for dev_dbg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux