mirror of https://gitee.com/openkylin/linux.git
HID: intel_ish-hid: fix format string for size_t
When building for 32-bit architectures, we get a harmless warning: intel-ish-hid/ishtp-hid-client.c: In function 'process_recv': intel-ish-hid/ishtp-hid-client.c:139:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format=] This changes the format string to print size_t variables using %zu instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2503f7babb
commit
318fc2a867
|
@ -136,10 +136,9 @@ static void process_recv(struct ishtp_cl *hid_ishtp_cl, void *recv_buf,
|
||||||
if (1 + sizeof(struct device_info) * i >=
|
if (1 + sizeof(struct device_info) * i >=
|
||||||
payload_len) {
|
payload_len) {
|
||||||
dev_err(&client_data->cl_device->dev,
|
dev_err(&client_data->cl_device->dev,
|
||||||
"[hid-ish]: [ENUM_DEVICES]: content size %lu is bigger than payload_len %u\n",
|
"[hid-ish]: [ENUM_DEVICES]: content size %zu is bigger than payload_len %zu\n",
|
||||||
1 + sizeof(struct device_info)
|
1 + sizeof(struct device_info)
|
||||||
* i,
|
* i, payload_len);
|
||||||
(unsigned int)payload_len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 + sizeof(struct device_info) * i >=
|
if (1 + sizeof(struct device_info) * i >=
|
||||||
|
|
Loading…
Reference in New Issue