[PATCH] staging:fbtft:Fix build warnings for incorrently using %d for size_t variables in dev_err statements
Nicholas Krause
xerofoify at gmail.com
Tue Feb 17 04:47:39 UTC 2015
Fixes the build warnings for using %d for a variable of type size_t in dev_err statements
for the functions,fbtft_read_spi and fbtft_write_spi_emulate_9 respectfully by changing
both dev_error calls to use the correct format specifier for size_t instead.
Signed-off-by: Nicholas Krause <xerofoify at gmail.com>
---
drivers/staging/fbtft/fbtft-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c
index 32155a7..9b2f8cf 100644
--- a/drivers/staging/fbtft/fbtft-io.c
+++ b/drivers/staging/fbtft/fbtft-io.c
@@ -59,7 +59,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len)
}
if ((len % 8) != 0) {
dev_err(par->info->device,
- "%s: error: len=%d must be divisible by 8\n",
+ "%s: error: len=%zu must be divisible by 8\n",
__func__, len);
return -EINVAL;
}
@@ -106,7 +106,7 @@ int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len)
if (par->startbyte) {
if (len > 32) {
dev_err(par->info->device,
- "%s: len=%d can't be larger than 32 when using 'startbyte'\n",
+ "%s: len=%zu can't be larger than 32 when using 'startbyte'\n",
__func__, len);
return -EINVAL;
}
--
2.1.0
More information about the devel
mailing list