]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: onenand: samsung: Fix printing format for size_t on 64-bit
authorKrzysztof Kozlowski <krzk@kernel.org>
Sun, 29 Dec 2019 18:36:11 +0000 (19:36 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 21 Jan 2020 19:00:34 +0000 (20:00 +0100)
Print size_t as %zu to fix -Wformat warnings when compiling on 64-bit
platform (e.g. with COMPILE_TEST):

    drivers/mtd/nand/onenand/samsung_mtd.c: In function ‘s5pc110_read_bufferram’:
    drivers/mtd/nand/onenand/samsung_mtd.c:661:16: warning:
        format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
       dev_err(dev, "Couldn't map a %d byte buffer for DMA\n", count);

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/onenand/samsung_mtd.c

index 2a75fa794e132a07dfa3097257d948e61420d61f..87b28e397d671e7d07745c43f9d47f5e22737d5e 100644 (file)
@@ -658,7 +658,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
                dma_dst = dma_map_single(dev, buf, count, DMA_FROM_DEVICE);
        }
        if (dma_mapping_error(dev, dma_dst)) {
-               dev_err(dev, "Couldn't map a %d byte buffer for DMA\n", count);
+               dev_err(dev, "Couldn't map a %zu byte buffer for DMA\n", count);
                goto normal;
        }
        err = s5pc110_dma_ops(dma_dst, dma_src,