diff mbox series

i2c: davinci: use correct format identifier for size_t

Message ID 20171017221709.24992-1-wsa@the-dreams.de
State Accepted
Headers show
Series i2c: davinci: use correct format identifier for size_t | expand

Commit Message

Wolfram Sang Oct. 17, 2017, 10:17 p.m. UTC
Fixes this warning (found by build testing with 64bit):

format ‘%i’ expects argument of type ‘int’, but argument 3 has type
‘size_t {aka long unsigned int}’ [-Wformat=]

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-davinci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sekhar Nori Oct. 19, 2017, 5:57 a.m. UTC | #1
On Wednesday 18 October 2017 03:47 AM, Wolfram Sang wrote:
> Fixes this warning (found by build testing with 64bit):
> 
> format ‘%i’ expects argument of type ‘int’, but argument 3 has type
> ‘size_t {aka long unsigned int}’ [-Wformat=]
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar
Wolfram Sang Oct. 26, 2017, 8:23 p.m. UTC | #2
On Wed, Oct 18, 2017 at 12:17:09AM +0200, Wolfram Sang wrote:
> Fixes this warning (found by build testing with 64bit):
> 
> format ‘%i’ expects argument of type ‘int’, but argument 3 has type
> ‘size_t {aka long unsigned int}’ [-Wformat=]
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index a2d9f7c56dacdc..2ead9b9eebb79a 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -504,7 +504,7 @@  i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
 		/* This should be 0 if all bytes were transferred
 		 * or dev->cmd_err denotes an error.
 		 */
-		dev_err(dev->dev, "abnormal termination buf_len=%i\n",
+		dev_err(dev->dev, "abnormal termination buf_len=%zu\n",
 			dev->buf_len);
 		dev->terminate = 1;
 		wmb();