Message ID | 20191229183612.22133-2-krzk@kernel.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 440c24535caf9a2ae393a555b2e23854037d65e2 |
Headers | show |
Series | [1/3] mtd: onenand: samsung: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit | expand |
On Sun, 2019-12-29 at 18:36:11 UTC, Krzysztof Kozlowski wrote: > 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> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel
diff --git a/drivers/mtd/nand/onenand/samsung_mtd.c b/drivers/mtd/nand/onenand/samsung_mtd.c index 70501d031db6..4a78c0aed6dd 100644 --- a/drivers/mtd/nand/onenand/samsung_mtd.c +++ b/drivers/mtd/nand/onenand/samsung_mtd.c @@ -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,
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> --- drivers/mtd/nand/onenand/samsung_mtd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)