]> git.baikalelectronics.ru Git - kernel.git/commit
Hid: wacom: Fix kernel test robot warning
authorJoshua-Dickens <Joshua@Joshua-Dickens.com>
Sat, 30 Apr 2022 00:01:34 +0000 (17:01 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 6 May 2022 06:36:28 +0000 (08:36 +0200)
commitc61ba3b24326f8a86ccd0c3a63938913fc4f7733
tree6173c52cdc0be4210056994d75834ee2c021f838
parent86c040f4b6688d5f0a9a8c5b52e5e16d0799b71e
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 <lkp@intel.com>
Signed-off-by: Joshua Dickens <joshua.dickens@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c