diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-05-18 16:21:43 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-05-30 08:11:52 -0400 |
commit | 318fc2a867bc5bac688cb88f111eb75792675dc2 (patch) | |
tree | dc4b6bd4194d183357ddb30c580e35148790451d | |
parent | 2503f7babbc7f570d06cfa3ca6b7ceec9262ced3 (diff) |
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>
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp-hid-client.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid-client.c b/drivers/hid/intel-ish-hid/ishtp-hid-client.c index 5c643d7a07b2..157b44aacdff 100644 --- a/drivers/hid/intel-ish-hid/ishtp-hid-client.c +++ b/drivers/hid/intel-ish-hid/ishtp-hid-client.c | |||
@@ -136,10 +136,9 @@ static void process_recv(struct ishtp_cl *hid_ishtp_cl, void *recv_buf, | |||
136 | if (1 + sizeof(struct device_info) * i >= | 136 | if (1 + sizeof(struct device_info) * i >= |
137 | payload_len) { | 137 | payload_len) { |
138 | dev_err(&client_data->cl_device->dev, | 138 | dev_err(&client_data->cl_device->dev, |
139 | "[hid-ish]: [ENUM_DEVICES]: content size %lu is bigger than payload_len %u\n", | 139 | "[hid-ish]: [ENUM_DEVICES]: content size %zu is bigger than payload_len %zu\n", |
140 | 1 + sizeof(struct device_info) | 140 | 1 + sizeof(struct device_info) |
141 | * i, | 141 | * i, payload_len); |
142 | (unsigned int)payload_len); | ||
143 | } | 142 | } |
144 | 143 | ||
145 | if (1 + sizeof(struct device_info) * i >= | 144 | if (1 + sizeof(struct device_info) * i >= |