Commit d88591a5 authored by Joshua-Dickens's avatar Joshua-Dickens Committed by Jiri Kosina

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarJoshua Dickens <joshua.dickens@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent b3ddadbf
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment