staging: fbtft: fbtft-core: Use '%zu' to print 'size_t' format
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 19 Feb 2015 12:12:11 +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 warning is seen:

drivers/staging/fbtft/fbtft-core.c:1004:4: warning: format '%d' expects argument of type 'int', but argument 3 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-core.c

index 8ca45110cfbe90d9b4ba6af2e69761913b3eba1d..e8d8d07d5f236c54ff0197408640314737d7dd45 100644 (file)
@@ -1000,7 +1000,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
        fbtft_sysfs_init(par);
 
        if (par->txbuf.buf)
-               sprintf(text1, ", %d KiB %sbuffer memory",
+               sprintf(text1, ", %zu KiB %sbuffer memory",
                        par->txbuf.len >> 10, par->txbuf.dma ? "DMA " : "");
        if (spi)
                sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num,