From: Joshua-Dickens Date: Sat, 30 Apr 2022 00:01:34 +0000 (-0700) Subject: Hid: wacom: Fix kernel test robot warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d88591a555325f6f0ec1f28c5fe2c7f2383a4366;p=linux.git Hid: wacom: Fix kernel test robot warning Kernel test robot throws the following warning - >> drivers/hid/wacom_wac.c:2411:42: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat] hid_warn(hdev, "Dropped %hu packets", value - wacom_wac->hid_data.sequence_number); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %d Explicitly casting the argument to unsigned short to silence the warning and retain the intended behavior. Reported-by: kernel test robot Signed-off-by: Joshua Dickens Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 64fe573deb9b3..9470c2b0b5294 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2408,7 +2408,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field return; case WACOM_HID_WD_SEQUENCENUMBER: if (wacom_wac->hid_data.sequence_number != value) - hid_warn(hdev, "Dropped %hu packets", value - wacom_wac->hid_data.sequence_number); + hid_warn(hdev, "Dropped %hu packets", (unsigned short)(value - wacom_wac->hid_data.sequence_number)); wacom_wac->hid_data.sequence_number = value + 1; return; }