HID: quirks: use correct format chars in dbg_hid
authorLouis Taylor <louis@kragniz.eu>
Wed, 27 Feb 2019 11:07:20 +0000 (11:07 +0000)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 11 Mar 2019 13:38:53 +0000 (14:38 +0100)
commit7d01427aaa78fa611f84c1a05fde66a41a6598be
tree65dc0b2ebf0e7f58bda3bb6c14423c8fd3ec076e
parentc6400e5cef5eafc259e649ceedc4c7eecc9069d8
HID: quirks: use correct format chars in dbg_hid

When building with -Wformat, clang warns:

drivers/hid/hid-quirks.c:1075:27: warning: format specifies type
'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
[-Wformat]
  bl_entry->driver_data, bl_entry->vendor,
 ^~~~~~~~~~~~~~~~
./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
   ~~~~~~              ^~~
drivers/hid/hid-quirks.c:1076:4: warning: format specifies type
'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
[-Wformat]
  bl_entry->product);
  ^~~~~~~~~~~~~~~~~
./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
   ~~~~~~              ^~~
drivers/hid/hid-quirks.c:1242:12: warning: format specifies type
'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
[-Wformat]
  quirks, hdev->vendor, hdev->product);
  ^~~~~~~~~~~~
./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
   ~~~~~~              ^~~
drivers/hid/hid-quirks.c:1242:26: warning: format specifies type
'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
[-Wformat]
  quirks, hdev->vendor, hdev->product);
^~~~~~~~~~~~~
./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
   ~~~~~~              ^~~
4 warnings generated.

This patch fixes the format strings to use the correct format type for unsigned
ints.

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Signed-off-by: Louis Taylor <louis@kragniz.eu>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-quirks.c