linux-stable/drivers/hid/i2c-hid
Arnd Bergmann f44eef7c2e HID: i2c-hid: fix format string mismatch
[ Upstream commit dc5f9f5550 ]

clang doesn't like printing a 32-bit integer using %hX format string:

drivers/hid/i2c-hid/i2c-hid-core.c:994:18: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client->name, hid->vendor, hid->product);
                               ^~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:994:31: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client->name, hid->vendor, hid->product);
                                            ^~~~~~~~~~~~

Use an explicit cast to truncate it to the low 16 bits instead.

Fixes: 9ee3e06610 ("HID: i2c-hid: override HID descriptors for certain devices")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-10 12:43:50 +02:00
..
i2c-hid-core.c HID: i2c-hid: fix format string mismatch 2021-06-10 12:43:50 +02:00
i2c-hid-dmi-quirks.c HID: i2c-hid: add Vero K147 to descriptor override 2020-12-29 13:46:49 +01:00
i2c-hid.h
Kconfig
Makefile