• Lee Jones's avatar
    usb: misc: sisusbvga: Move static const tables out to different include file · 313da01a
    Lee Jones authored
    sisusb_init.h is included by multiple source files, but the big data
    tables contained are only referenced by one of them, leaving the tables
    'defined but not used' by the remainder.  We have a choice to either
    place them inside the source file, taking up may lines and potentially
    overwhelming the source file OR tuck them away neatly inside their own
    headerfile.  The latter was chosen.
    
    Fixes the following W=1 kernel build warning(s):
    
     In file included from drivers/usb/misc/sisusbvga/sisusb.c:54:
     drivers/usb/misc/sisusbvga/sisusb_init.h:664:34: warning: ‘SiSUSB_VCLKData’ defined but not used [-Wunused-const-variable=]
     664 | static const struct SiS_VCLKData SiSUSB_VCLKData[] = {
     | ^~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:406:35: warning: ‘SiSUSB_CRT1Table’ defined but not used [-Wunused-const-variable=]
     406 | static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = {
     | ^~~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:348:30: warning: ‘SiSUSB_RefIndex’ defined but not used [-Wunused-const-variable=]
     348 | static const struct SiS_Ext2 SiSUSB_RefIndex[] = {
     | ^~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:269:29: warning: ‘SiSUSB_EModeIDTable’ defined but not used [-Wunused-const-variable=]
     269 | static const struct SiS_Ext SiSUSB_EModeIDTable[] = {
     | ^~~~~~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:238:36: warning: ‘SiSUSB_StandTable’ defined but not used [-Wunused-const-variable=]
     238 | static const struct SiS_StandTable SiSUSB_StandTable[] = {
     | ^~~~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:201:37: warning: ‘SiSUSB_ModeResInfo’ defined but not used [-Wunused-const-variable=]
     201 | static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = {
     | ^~~~~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:196:28: warning: ‘SiSUSB_SModeIDTable’ defined but not used [-Wunused-const-variable=]
     196 | static const struct SiS_St SiSUSB_SModeIDTable[] = {
     | ^~~~~~~~~~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:183:28: warning: ‘SiS_VGA_DAC’ defined but not used [-Wunused-const-variable=]
     183 | static const unsigned char SiS_VGA_DAC[] = {
     | ^~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:172:28: warning: ‘SiS_EGA_DAC’ defined but not used [-Wunused-const-variable=]
     172 | static const unsigned char SiS_EGA_DAC[] = {
     | ^~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:161:28: warning: ‘SiS_CGA_DAC’ defined but not used [-Wunused-const-variable=]
     161 | static const unsigned char SiS_CGA_DAC[] = {
     | ^~~~~~~~~~~
     drivers/usb/misc/sisusbvga/sisusb_init.h:150:28: warning: ‘SiS_MDA_DAC’ defined but not used [-Wunused-const-variable=]
     150 | static const unsigned char SiS_MDA_DAC[] = {
     | ^~~~~~~~~~~
    
    Cc: Thomas Winischhofer <thomas@winischhofer.net>
    Cc: Joe Perches <joe@perches.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Link: https://lore.kernel.org/r/20200715093209.3165641-9-lee.jones@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    313da01a
sisusb_init.h 6.65 KB