diff mbox series

[5/6] USB: sisusbvga: change sisusb_read_mem_bulk

Message ID 20200530014820.9967-6-liu.changm@northeastern.edu (mailing list archive)
State New, archived
Headers show
Series [1/6] USB: sisusbvga: change char to u8 for sisusb_copy_memory | expand

Commit Message

Changming May 30, 2020, 1:48 a.m. UTC
From: Changming Liu <liu.changm@northeastern.edu>

change sisusb_read_mem_bulk userbuffer,kernbuffer
and local buf from char to u8.

Also it's called by sisusb_read_memory sisusb_testreadwrite
and sisusb_read. Change their parameter types accordingly.

Signed-off-by: Changming Liu <liu.changm@northeastern.edu>
---
 drivers/usb/misc/sisusbvga/sisusb.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

kernel test robot May 31, 2020, 10:26 p.m. UTC | #1
Hi Changming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next peter.chen-usb/ci-for-usb-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Changming/USB-sisusbvga-series-of-changes-char-to-u8/20200601-012438
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/misc/sisusbvga/sisusb.c:2996:11: error: initialization of 'ssize_t (*)(struct file *, char *, size_t,  loff_t *)' {aka 'long int (*)(struct file *, char *, long unsigned int,  long long int *)'} from incompatible pointer type 'ssize_t (*)(struct file *, u8 *, size_t,  loff_t *)' {aka 'long int (*)(struct file *, unsigned char *, long unsigned int,  long long int *)'} [-Werror=incompatible-pointer-types]
2996 |  .read =  sisusb_read,
|           ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb.c:2996:11: note: (near initialization for 'usb_sisusb_fops.read')
drivers/usb/misc/sisusbvga/sisusb.c:2997:11: error: initialization of 'ssize_t (*)(struct file *, const char *, size_t,  loff_t *)' {aka 'long int (*)(struct file *, const char *, long unsigned int,  long long int *)'} from incompatible pointer type 'ssize_t (*)(struct file *, const u8 *, size_t,  loff_t *)' {aka 'long int (*)(struct file *, const unsigned char *, long unsigned int,  long long int *)'} [-Werror=incompatible-pointer-types]
2997 |  .write = sisusb_write,
|           ^~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb.c:2997:11: note: (near initialization for 'usb_sisusb_fops.write')
In file included from drivers/usb/misc/sisusbvga/sisusb.c:54:
drivers/usb/misc/sisusbvga/sisusb_init.h:695:34: warning: 'SiSUSB_VCLKData' defined but not used [-Wunused-const-variable=]
695 | static const struct SiS_VCLKData SiSUSB_VCLKData[] = {
|                                  ^~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:437:35: warning: 'SiSUSB_CRT1Table' defined but not used [-Wunused-const-variable=]
437 | static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = {
|                                   ^~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:379:30: warning: 'SiSUSB_RefIndex' defined but not used [-Wunused-const-variable=]
379 | static const struct SiS_Ext2 SiSUSB_RefIndex[] = {
|                              ^~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:300:29: warning: 'SiSUSB_EModeIDTable' defined but not used [-Wunused-const-variable=]
300 | static const struct SiS_Ext SiSUSB_EModeIDTable[] = {
|                             ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:269:36: warning: 'SiSUSB_StandTable' defined but not used [-Wunused-const-variable=]
269 | static const struct SiS_StandTable SiSUSB_StandTable[] = {
|                                    ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:232:37: warning: 'SiSUSB_ModeResInfo' defined but not used [-Wunused-const-variable=]
232 | static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = {
|                                     ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:224:37: warning: 'SiSUSB_StResInfo' defined but not used [-Wunused-const-variable=]
224 | static const struct SiS_StResInfo_S SiSUSB_StResInfo[] = {
|                                     ^~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:219:28: warning: 'SiSUSB_SModeIDTable' defined but not used [-Wunused-const-variable=]
219 | static const struct SiS_St SiSUSB_SModeIDTable[] = {
|                            ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:206:28: warning: 'SiS_VGA_DAC' defined but not used [-Wunused-const-variable=]
206 | static const unsigned char SiS_VGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:195:28: warning: 'SiS_EGA_DAC' defined but not used [-Wunused-const-variable=]
195 | static const unsigned char SiS_EGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:184:28: warning: 'SiS_CGA_DAC' defined but not used [-Wunused-const-variable=]
184 | static const unsigned char SiS_CGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:173:28: warning: 'SiS_MDA_DAC' defined but not used [-Wunused-const-variable=]
173 | static const unsigned char SiS_MDA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:171:29: warning: 'ModeIndex_1280x1024' defined but not used [-Wunused-const-variable=]
171 | static const unsigned short ModeIndex_1280x1024[] = { 0x3a, 0x4d, 0x00, 0x65 };
|                             ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:170:29: warning: 'ModeIndex_1280x768' defined but not used [-Wunused-const-variable=]
170 | static const unsigned short ModeIndex_1280x768[] = { 0x23, 0x24, 0x00, 0x25 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:169:29: warning: 'ModeIndex_1280x720' defined but not used [-Wunused-const-variable=]
169 | static const unsigned short ModeIndex_1280x720[] = { 0x79, 0x75, 0x00, 0x78 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:168:29: warning: 'ModeIndex_1152x864' defined but not used [-Wunused-const-variable=]
168 | static const unsigned short ModeIndex_1152x864[] = { 0x29, 0x2a, 0x00, 0x2b };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:167:29: warning: 'ModeIndex_1024x576' defined but not used [-Wunused-const-variable=]
167 | static const unsigned short ModeIndex_1024x576[] = { 0x71, 0x74, 0x00, 0x77 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:166:29: warning: 'ModeIndex_1024x768' defined but not used [-Wunused-const-variable=]
166 | static const unsigned short ModeIndex_1024x768[] = { 0x38, 0x4a, 0x00, 0x64 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:165:29: warning: 'ModeIndex_960x600' defined but not used [-Wunused-const-variable=]
165 | static const unsigned short ModeIndex_960x600[] = { 0x20, 0x21, 0x00, 0x22 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:164:29: warning: 'ModeIndex_960x540' defined but not used [-Wunused-const-variable=]
164 | static const unsigned short ModeIndex_960x540[] = { 0x1d, 0x1e, 0x00, 0x1f };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:163:29: warning: 'ModeIndex_856x480' defined but not used [-Wunused-const-variable=]
163 | static const unsigned short ModeIndex_856x480[] = { 0x3f, 0x42, 0x00, 0x45 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:162:29: warning: 'ModeIndex_848x480' defined but not used [-Wunused-const-variable=]
162 | static const unsigned short ModeIndex_848x480[] = { 0x39, 0x3b, 0x00, 0x3e };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:161:29: warning: 'ModeIndex_800x600' defined but not used [-Wunused-const-variable=]
161 | static const unsigned short ModeIndex_800x600[] = { 0x30, 0x47, 0x00, 0x63 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:160:29: warning: 'ModeIndex_800x480' defined but not used [-Wunused-const-variable=]
160 | static const unsigned short ModeIndex_800x480[] = { 0x70, 0x7a, 0x00, 0x76 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:159:29: warning: 'ModeIndex_768x576' defined but not used [-Wunused-const-variable=]
159 | static const unsigned short ModeIndex_768x576[] = { 0x5f, 0x60, 0x00, 0x61 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:158:29: warning: 'ModeIndex_720x576' defined but not used [-Wunused-const-variable=]
158 | static const unsigned short ModeIndex_720x576[] = { 0x32, 0x34, 0x00, 0x36 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:157:29: warning: 'ModeIndex_720x480' defined but not used [-Wunused-const-variable=]
157 | static const unsigned short ModeIndex_720x480[] = { 0x31, 0x33, 0x00, 0x35 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:156:29: warning: 'ModeIndex_640x480' defined but not used [-Wunused-const-variable=]
156 | static const unsigned short ModeIndex_640x480[] = { 0x2e, 0x44, 0x00, 0x62 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:155:29: warning: 'ModeIndex_640x400' defined but not used [-Wunused-const-variable=]
155 | static const unsigned short ModeIndex_640x400[] = { 0x2f, 0x5d, 0x00, 0x5e };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:154:29: warning: 'ModeIndex_512x384' defined but not used [-Wunused-const-variable=]
154 | static const unsigned short ModeIndex_512x384[] = { 0x52, 0x58, 0x00, 0x5c };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:153:29: warning: 'ModeIndex_400x300' defined but not used [-Wunused-const-variable=]
153 | static const unsigned short ModeIndex_400x300[] = { 0x51, 0x57, 0x00, 0x54 };

vim +2996 drivers/usb/misc/sisusbvga/sisusb.c

^1da177e4c3f41 Linus Torvalds              2005-04-16  2991  
066202dd48cf32 Luiz Fernando N. Capitulino 2006-08-05  2992  static const struct file_operations usb_sisusb_fops = {
^1da177e4c3f41 Linus Torvalds              2005-04-16  2993  	.owner =	THIS_MODULE,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2994  	.open =		sisusb_open,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2995  	.release =	sisusb_release,
^1da177e4c3f41 Linus Torvalds              2005-04-16 @2996  	.read =		sisusb_read,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2997  	.write =	sisusb_write,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2998  	.llseek =	sisusb_lseek,
022e468e139573 Jiri Slaby                  2019-01-22  2999  #ifdef CONFIG_COMPAT
^1da177e4c3f41 Linus Torvalds              2005-04-16  3000  	.compat_ioctl = sisusb_compat_ioctl,
^1da177e4c3f41 Linus Torvalds              2005-04-16  3001  #endif
49f15255465321 Alan Cox                    2008-05-22  3002  	.unlocked_ioctl = sisusb_ioctl
^1da177e4c3f41 Linus Torvalds              2005-04-16  3003  };
^1da177e4c3f41 Linus Torvalds              2005-04-16  3004  

:::::: The code at line 2996 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot May 31, 2020, 10:43 p.m. UTC | #2
Hi Changming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Changming/USB-sisusbvga-series-of-changes-char-to-u8/20200601-012438
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/misc/sisusbvga/sisusb.c:2996:11: error: incompatible function pointer types initializing 'ssize_t (*)(struct file *, char *, size_t, loff_t *)' (aka 'long (*)(struct file *, char *, unsigned long, long long *)') with an expression of type 'ssize_t (struct file *, u8 *, size_t, loff_t *)' (aka 'long (struct file *, unsigned char *, unsigned long, long long *)') [-Werror,-Wincompatible-function-pointer-types]
.read =         sisusb_read,
^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb.c:2997:11: error: incompatible function pointer types initializing 'ssize_t (*)(struct file *, const char *, size_t, loff_t *)' (aka 'long (*)(struct file *, const char *, unsigned long, long long *)') with an expression of type 'ssize_t (struct file *, const u8 *, size_t, loff_t *)' (aka 'long (struct file *, const unsigned char *, unsigned long, long long *)') [-Werror,-Wincompatible-function-pointer-types]
.write =        sisusb_write,
^~~~~~~~~~~~
2 errors generated.

vim +2996 drivers/usb/misc/sisusbvga/sisusb.c

^1da177e4c3f41 Linus Torvalds              2005-04-16  2991  
066202dd48cf32 Luiz Fernando N. Capitulino 2006-08-05  2992  static const struct file_operations usb_sisusb_fops = {
^1da177e4c3f41 Linus Torvalds              2005-04-16  2993  	.owner =	THIS_MODULE,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2994  	.open =		sisusb_open,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2995  	.release =	sisusb_release,
^1da177e4c3f41 Linus Torvalds              2005-04-16 @2996  	.read =		sisusb_read,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2997  	.write =	sisusb_write,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2998  	.llseek =	sisusb_lseek,
022e468e139573 Jiri Slaby                  2019-01-22  2999  #ifdef CONFIG_COMPAT
^1da177e4c3f41 Linus Torvalds              2005-04-16  3000  	.compat_ioctl = sisusb_compat_ioctl,
^1da177e4c3f41 Linus Torvalds              2005-04-16  3001  #endif
49f15255465321 Alan Cox                    2008-05-22  3002  	.unlocked_ioctl = sisusb_ioctl
^1da177e4c3f41 Linus Torvalds              2005-04-16  3003  };
^1da177e4c3f41 Linus Torvalds              2005-04-16  3004  

:::::: The code at line 2996 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot May 31, 2020, 10:47 p.m. UTC | #3
Hi Changming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next peter.chen-usb/ci-for-usb-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Changming/USB-sisusbvga-series-of-changes-char-to-u8/20200601-012438
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/misc/sisusbvga/sisusb.c:2996:11: error: initialization of 'ssize_t (*)(struct file *, char *, size_t,  loff_t *)' {aka 'int (*)(struct file *, char *, unsigned int,  long long int *)'} from incompatible pointer type 'ssize_t (*)(struct file *, u8 *, size_t,  loff_t *)' {aka 'int (*)(struct file *, unsigned char *, unsigned int,  long long int *)'} [-Werror=incompatible-pointer-types]
2996 |  .read =  sisusb_read,
|           ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb.c:2996:11: note: (near initialization for 'usb_sisusb_fops.read')
drivers/usb/misc/sisusbvga/sisusb.c:2997:11: error: initialization of 'ssize_t (*)(struct file *, const char *, size_t,  loff_t *)' {aka 'int (*)(struct file *, const char *, unsigned int,  long long int *)'} from incompatible pointer type 'ssize_t (*)(struct file *, const u8 *, size_t,  loff_t *)' {aka 'int (*)(struct file *, const unsigned char *, unsigned int,  long long int *)'} [-Werror=incompatible-pointer-types]
2997 |  .write = sisusb_write,
|           ^~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb.c:2997:11: note: (near initialization for 'usb_sisusb_fops.write')
In file included from drivers/usb/misc/sisusbvga/sisusb.c:54:
drivers/usb/misc/sisusbvga/sisusb_init.h:695:34: warning: 'SiSUSB_VCLKData' defined but not used [-Wunused-const-variable=]
695 | static const struct SiS_VCLKData SiSUSB_VCLKData[] = {
|                                  ^~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:437:35: warning: 'SiSUSB_CRT1Table' defined but not used [-Wunused-const-variable=]
437 | static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = {
|                                   ^~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:379:30: warning: 'SiSUSB_RefIndex' defined but not used [-Wunused-const-variable=]
379 | static const struct SiS_Ext2 SiSUSB_RefIndex[] = {
|                              ^~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:300:29: warning: 'SiSUSB_EModeIDTable' defined but not used [-Wunused-const-variable=]
300 | static const struct SiS_Ext SiSUSB_EModeIDTable[] = {
|                             ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:269:36: warning: 'SiSUSB_StandTable' defined but not used [-Wunused-const-variable=]
269 | static const struct SiS_StandTable SiSUSB_StandTable[] = {
|                                    ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:232:37: warning: 'SiSUSB_ModeResInfo' defined but not used [-Wunused-const-variable=]
232 | static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = {
|                                     ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:224:37: warning: 'SiSUSB_StResInfo' defined but not used [-Wunused-const-variable=]
224 | static const struct SiS_StResInfo_S SiSUSB_StResInfo[] = {
|                                     ^~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:219:28: warning: 'SiSUSB_SModeIDTable' defined but not used [-Wunused-const-variable=]
219 | static const struct SiS_St SiSUSB_SModeIDTable[] = {
|                            ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:206:28: warning: 'SiS_VGA_DAC' defined but not used [-Wunused-const-variable=]
206 | static const unsigned char SiS_VGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:195:28: warning: 'SiS_EGA_DAC' defined but not used [-Wunused-const-variable=]
195 | static const unsigned char SiS_EGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:184:28: warning: 'SiS_CGA_DAC' defined but not used [-Wunused-const-variable=]
184 | static const unsigned char SiS_CGA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:173:28: warning: 'SiS_MDA_DAC' defined but not used [-Wunused-const-variable=]
173 | static const unsigned char SiS_MDA_DAC[] = {
|                            ^~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:171:29: warning: 'ModeIndex_1280x1024' defined but not used [-Wunused-const-variable=]
171 | static const unsigned short ModeIndex_1280x1024[] = { 0x3a, 0x4d, 0x00, 0x65 };
|                             ^~~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:170:29: warning: 'ModeIndex_1280x768' defined but not used [-Wunused-const-variable=]
170 | static const unsigned short ModeIndex_1280x768[] = { 0x23, 0x24, 0x00, 0x25 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:169:29: warning: 'ModeIndex_1280x720' defined but not used [-Wunused-const-variable=]
169 | static const unsigned short ModeIndex_1280x720[] = { 0x79, 0x75, 0x00, 0x78 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:168:29: warning: 'ModeIndex_1152x864' defined but not used [-Wunused-const-variable=]
168 | static const unsigned short ModeIndex_1152x864[] = { 0x29, 0x2a, 0x00, 0x2b };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:167:29: warning: 'ModeIndex_1024x576' defined but not used [-Wunused-const-variable=]
167 | static const unsigned short ModeIndex_1024x576[] = { 0x71, 0x74, 0x00, 0x77 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:166:29: warning: 'ModeIndex_1024x768' defined but not used [-Wunused-const-variable=]
166 | static const unsigned short ModeIndex_1024x768[] = { 0x38, 0x4a, 0x00, 0x64 };
|                             ^~~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:165:29: warning: 'ModeIndex_960x600' defined but not used [-Wunused-const-variable=]
165 | static const unsigned short ModeIndex_960x600[] = { 0x20, 0x21, 0x00, 0x22 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:164:29: warning: 'ModeIndex_960x540' defined but not used [-Wunused-const-variable=]
164 | static const unsigned short ModeIndex_960x540[] = { 0x1d, 0x1e, 0x00, 0x1f };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:163:29: warning: 'ModeIndex_856x480' defined but not used [-Wunused-const-variable=]
163 | static const unsigned short ModeIndex_856x480[] = { 0x3f, 0x42, 0x00, 0x45 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:162:29: warning: 'ModeIndex_848x480' defined but not used [-Wunused-const-variable=]
162 | static const unsigned short ModeIndex_848x480[] = { 0x39, 0x3b, 0x00, 0x3e };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:161:29: warning: 'ModeIndex_800x600' defined but not used [-Wunused-const-variable=]
161 | static const unsigned short ModeIndex_800x600[] = { 0x30, 0x47, 0x00, 0x63 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:160:29: warning: 'ModeIndex_800x480' defined but not used [-Wunused-const-variable=]
160 | static const unsigned short ModeIndex_800x480[] = { 0x70, 0x7a, 0x00, 0x76 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:159:29: warning: 'ModeIndex_768x576' defined but not used [-Wunused-const-variable=]
159 | static const unsigned short ModeIndex_768x576[] = { 0x5f, 0x60, 0x00, 0x61 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:158:29: warning: 'ModeIndex_720x576' defined but not used [-Wunused-const-variable=]
158 | static const unsigned short ModeIndex_720x576[] = { 0x32, 0x34, 0x00, 0x36 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:157:29: warning: 'ModeIndex_720x480' defined but not used [-Wunused-const-variable=]
157 | static const unsigned short ModeIndex_720x480[] = { 0x31, 0x33, 0x00, 0x35 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:156:29: warning: 'ModeIndex_640x480' defined but not used [-Wunused-const-variable=]
156 | static const unsigned short ModeIndex_640x480[] = { 0x2e, 0x44, 0x00, 0x62 };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:155:29: warning: 'ModeIndex_640x400' defined but not used [-Wunused-const-variable=]
155 | static const unsigned short ModeIndex_640x400[] = { 0x2f, 0x5d, 0x00, 0x5e };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:154:29: warning: 'ModeIndex_512x384' defined but not used [-Wunused-const-variable=]
154 | static const unsigned short ModeIndex_512x384[] = { 0x52, 0x58, 0x00, 0x5c };
|                             ^~~~~~~~~~~~~~~~~
drivers/usb/misc/sisusbvga/sisusb_init.h:153:29: warning: 'ModeIndex_400x300' defined but not used [-Wunused-const-variable=]
153 | static const unsigned short ModeIndex_400x300[] = { 0x51, 0x57, 0x00, 0x54 };

vim +2996 drivers/usb/misc/sisusbvga/sisusb.c

^1da177e4c3f41 Linus Torvalds              2005-04-16  2991  
066202dd48cf32 Luiz Fernando N. Capitulino 2006-08-05  2992  static const struct file_operations usb_sisusb_fops = {
^1da177e4c3f41 Linus Torvalds              2005-04-16  2993  	.owner =	THIS_MODULE,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2994  	.open =		sisusb_open,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2995  	.release =	sisusb_release,
^1da177e4c3f41 Linus Torvalds              2005-04-16 @2996  	.read =		sisusb_read,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2997  	.write =	sisusb_write,
^1da177e4c3f41 Linus Torvalds              2005-04-16  2998  	.llseek =	sisusb_lseek,
022e468e139573 Jiri Slaby                  2019-01-22  2999  #ifdef CONFIG_COMPAT
^1da177e4c3f41 Linus Torvalds              2005-04-16  3000  	.compat_ioctl = sisusb_compat_ioctl,
^1da177e4c3f41 Linus Torvalds              2005-04-16  3001  #endif
49f15255465321 Alan Cox                    2008-05-22  3002  	.unlocked_ioctl = sisusb_ioctl
^1da177e4c3f41 Linus Torvalds              2005-04-16  3003  };
^1da177e4c3f41 Linus Torvalds              2005-04-16  3004  

:::::: The code at line 2996 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 9e858530c4ed..1f21db40fdb5 100755
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -1104,11 +1104,11 @@  static int sisusb_read_memio_long(struct sisusb_usb_data *sisusb, int type,
 }
 
 static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
-		char *kernbuffer, int length, char __user *userbuffer,
+		u8 *kernbuffer, int length, u8 __user *userbuffer,
 		ssize_t *bytes_read)
 {
 	int ret = 0;
-	char buf[4];
+	u8 buf[4];
 	u16 swap16;
 	u32 swap32;
 
@@ -1293,7 +1293,7 @@  int sisusb_copy_memory(struct sisusb_usb_data *sisusb, u8 *src,
 }
 
 #ifdef SISUSBENDIANTEST
-static int sisusb_read_memory(struct sisusb_usb_data *sisusb, char *dest,
+static int sisusb_read_memory(struct sisusb_usb_data *sisusb, u8 *dest,
 		u32 src, int length)
 {
 	size_t dummy;
@@ -1308,7 +1308,7 @@  static int sisusb_read_memory(struct sisusb_usb_data *sisusb, char *dest,
 static void sisusb_testreadwrite(struct sisusb_usb_data *sisusb)
 {
 	static u8 srcbuffer[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
-	char destbuffer[10];
+	u8 destbuffer[10];
 	int i, j;
 
 	sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7);
@@ -2479,7 +2479,7 @@  static int sisusb_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static ssize_t sisusb_read(struct file *file, char __user *buffer,
+static ssize_t sisusb_read(struct file *file, u8 __user *buffer,
 		size_t count, loff_t *ppos)
 {
 	struct sisusb_usb_data *sisusb;