From: Arnd Bergmann Date: Sat, 12 Aug 2023 17:17:58 +0000 (+0200) Subject: soc: kunpeng_hccs: fix size_t format string X-Git-Tag: v6.6.17~4069^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37696fa746731ce137f07b03443eec79bba07794;p=platform%2Fkernel%2Flinux-rpi.git soc: kunpeng_hccs: fix size_t format string Printing a size_t using the %lu format string causes a warning on architectures that define the type as 'unsigned int': In file included from include/linux/device.h:15, from include/linux/acpi.h:14, from drivers/soc/hisilicon/kunpeng_hccs.c:25: drivers/soc/hisilicon/kunpeng_hccs.c: In function 'hccs_get_bd_info': drivers/soc/hisilicon/kunpeng_hccs.c:441:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] Use the correct %zu format instead. Fixes: 886bdf9c883bc ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Arnd Bergmann --- diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c index 6864d20..0d6f6ba 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -438,7 +438,7 @@ static int hccs_get_bd_info(struct hccs_dev *hdev, u8 opcode, head = &rsp->rsp_head; if (head->data_len > buf_len) { dev_err(hdev->dev, - "buffer overflow (buf_len = %lu, data_len = %u)!\n", + "buffer overflow (buf_len = %zu, data_len = %u)!\n", buf_len, head->data_len); return -ENOMEM; }