OSDN Git Service

i2c: davinci: use correct format identifier for size_t
authorWolfram Sang <wsa@the-dreams.de>
Tue, 17 Oct 2017 22:17:09 +0000 (00:17 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 26 Oct 2017 20:22:46 +0000 (22:22 +0200)
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>
drivers/i2c/busses/i2c-davinci.c

index a2d9f7c..2ead9b9 100644 (file)
@@ -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();