Skip to content

Commit 37696fa

Browse files
committed
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: 886bdf9 ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent bb2974f commit 37696fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/hisilicon/kunpeng_hccs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static int hccs_get_bd_info(struct hccs_dev *hdev, u8 opcode,
438438
head = &rsp->rsp_head;
439439
if (head->data_len > buf_len) {
440440
dev_err(hdev->dev,
441-
"buffer overflow (buf_len = %lu, data_len = %u)!\n",
441+
"buffer overflow (buf_len = %zu, data_len = %u)!\n",
442442
buf_len, head->data_len);
443443
return -ENOMEM;
444444
}

0 commit comments

Comments
 (0)