• Louis Taylor's avatar
    HID: quirks: use correct format chars in dbg_hid · 7d01427a
    Louis Taylor authored
    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/378Signed-off-by: default avatarLouis Taylor <louis@kragniz.eu>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
    7d01427a
hid-quirks.c 69.2 KB