On Wed, Feb 17, 2016 at 4:20 PM, Fabio Estevam <fabio.estevam@xxxxxxx> wrote: > Use %zu for printing 'size_t' type in order to fix the following > build warning on ARM64: > > drivers/spi/spi.c: In function '__spi_split_transfer_maxsize': > drivers/spi/spi.c:2278:2: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=] > > Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx> Acked-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> However, I'm still wondering whether using size_t for this variable is the right thing to do. Maximum SPI transfer length is unsigned int. > --- > drivers/spi/spi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index f6c76be..0725ffa 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -2276,7 +2276,7 @@ static int __spi_split_transfer_maxsize(struct spi_master *master, > > /* warn once about this fact that we are splitting a transfer */ > dev_warn_once(&msg->spi->dev, > - "spi_transfer of length %i exceed max length of %i - needed to split transfers\n", > + "spi_transfer of length %i exceed max length of %zu - needed to split transfers\n", > xfer->len, maxsize); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html