Skip to content

Commit d88591a

Browse files
Joshua-DickensJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Joshua Dickens <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent b3ddadb commit d88591a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/wacom_wac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2408,7 +2408,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
24082408
return;
24092409
case WACOM_HID_WD_SEQUENCENUMBER:
24102410
if (wacom_wac->hid_data.sequence_number != value)
2411-
hid_warn(hdev, "Dropped %hu packets", value - wacom_wac->hid_data.sequence_number);
2411+
hid_warn(hdev, "Dropped %hu packets", (unsigned short)(value - wacom_wac->hid_data.sequence_number));
24122412
wacom_wac->hid_data.sequence_number = value + 1;
24132413
return;
24142414
}

0 commit comments

Comments
 (0)