staging: fbtft: fbtft-io: Use '%zu' to print 'size_t' format
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 19 Feb 2015 12:12:12 +0000 (10:12 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 01:13:12 +0000 (17:13 -0800)
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>
drivers/staging/fbtft/fbtft-io.c

index 32155a7b2a624099f8d7d1bee727ff6dc44f58af..9b2f8cfbb38683f71cfc5e3c2ddbd965366476a4 100644 (file)
@@ -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;
                }