Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: fbtft: fbtft-io: Use '%zu' to print 'size_t' format

When building for ARM64 the following build warnings are seen:

drivers/staging/fbtft/fbtft-io.c: In function 'fbtft_write_spi_emulate_9':
drivers/staging/fbtft/fbtft-io.c:63:4: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]

drivers/staging/fbtft/fbtft-io.c: In function 'fbtft_read_spi':
drivers/staging/fbtft/fbtft-io.c:110:5: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]

Use '%zu' to print 'size_t' format.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Fabio Estevam and committed by
Greg Kroah-Hartman
354fd570 3fed5bac

+2 -2
+2 -2
drivers/staging/fbtft/fbtft-io.c
··· 59 59 } 60 60 if ((len % 8) != 0) { 61 61 dev_err(par->info->device, 62 - "%s: error: len=%d must be divisible by 8\n", 62 + "%s: error: len=%zu must be divisible by 8\n", 63 63 __func__, len); 64 64 return -EINVAL; 65 65 } ··· 106 106 if (par->startbyte) { 107 107 if (len > 32) { 108 108 dev_err(par->info->device, 109 - "%s: len=%d can't be larger than 32 when using 'startbyte'\n", 109 + "%s: len=%zu can't be larger than 32 when using 'startbyte'\n", 110 110 __func__, len); 111 111 return -EINVAL; 112 112 }