Re: [PATCH] i2c: at91: Fix compilation warning.

From: Wolfram Sang
Date: Mon Jun 19 2017 - 10:39:27 EST


On Wed, May 31, 2017 at 12:45:38PM +0530, Arvind Yadav wrote:
> Replace '%d' by '%zu' to fix the following compilation warning:-
>
> drivers/i2c/busses/i2c-at91.c:277:2: warning: format â%dâ expects argument of type âintâ, but argument 5 has type âsize_tâ [-Wformat=]
> dev_dbg(dev->dev, "wrote 0x%x, to go %d\n", *dev->buf, dev->buf_len);
> ^
> drivers/i2c/busses/i2c-at91.c: In function âat91_twi_read_next_byteâ:
> drivers/i2c/busses/i2c-at91.c:405:4: warning: format â%dâ expects argument of type âintâ, but argument 4 has type âsize_tâ [-Wformat=]
> dev_dbg(dev->dev, "received block length %d\n",
> ^
> drivers/i2c/busses/i2c-at91.c:418:2: warning: format â%dâ expects argument of type âintâ, but argument 5 has type âsize_tâ [-Wformat=]
> dev_dbg(dev->dev, "read 0x%x, to go %d\n", *dev->buf, dev->buf_len);
> ^
> drivers/i2c/busses/i2c-at91.c: In function âat91_do_twi_transferâ:
> drivers/i2c/busses/i2c-at91.c:625:2: warning: format â%dâ expects argument of type âintâ, but argument 5 has type âsize_tâ [-Wformat=]
> dev_dbg(dev->dev, "transfer: %s %d bytes.\n",
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>

Shortened the commit message a little (i'd think one example is enough)
and applied to for-next, thanks!

Attachment: signature.asc
Description: PGP signature