lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 2 Nov 2022 04:12:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Guenter Roeck <linux@...ck-us.net>,
        Michael Schmitz <schmitzmic@...il.com>
Subject: drivers/block/paride/bpck.c:182:59: sparse: sparse: cast to
 restricted __le16

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5aaef24b5c6d4246b2cac1be949869fa36577737
commit: 30b5e6ef4a32ea4985b99200e06d6660a69f9246 m68k: atari: Make Atari ROM port I/O write macros return void
date:   5 months ago
config: m68k-randconfig-s031-20221031
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30b5e6ef4a32ea4985b99200e06d6660a69f9246
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 30b5e6ef4a32ea4985b99200e06d6660a69f9246
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/block/paride/bpck.c:182:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/bpck.c:182:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/bpck.c:182:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/bpck.c:182:59: sparse: sparse: cast to restricted __le16
   drivers/block/paride/bpck.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   drivers/block/paride/bpck.c:323:72: sparse: sparse: cast to restricted __le16
   drivers/block/paride/bpck.c:323:72: sparse: sparse: cast to restricted __le16
   drivers/block/paride/bpck.c:323:72: sparse: sparse: cast to restricted __le16
   drivers/block/paride/bpck.c:323:72: sparse: sparse: cast to restricted __le16
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/block/paride/comm.c:135:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/comm.c:135:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/comm.c:135:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/comm.c:135:59: sparse: sparse: cast to restricted __le16
   drivers/block/paride/comm.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/block/paride/dstr.c:145:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/dstr.c:145:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/dstr.c:145:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/dstr.c:145:59: sparse: sparse: cast to restricted __le16
   drivers/block/paride/dstr.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/block/paride/epat.c:146:62: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epat.c:146:62: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epat.c:146:62: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epat.c:146:62: sparse: sparse: cast to restricted __le16
   drivers/block/paride/epat.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/block/paride/epia.c:183:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epia.c:183:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epia.c:183:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/epia.c:183:59: sparse: sparse: cast to restricted __le16
   drivers/block/paride/epia.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
   drivers/block/paride/bpck6.c: note: in included file:
>> drivers/block/paride/ppc6lnx.c:470:50: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/ppc6lnx.c:470:50: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/ppc6lnx.c:470:50: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/ppc6lnx.c:470:50: sparse: sparse: cast to restricted __le16
   drivers/block/paride/bpck6.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/block/paride/on26.c:221:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/on26.c:221:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/on26.c:221:59: sparse: sparse: cast to restricted __le16
>> drivers/block/paride/on26.c:221:59: sparse: sparse: cast to restricted __le16
   drivers/block/paride/on26.c: note: in included file (through arch/m68k/include/asm/io.h):
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer
   arch/m68k/include/asm/io_mm.h:166:21: sparse: sparse: Using plain integer as NULL pointer

vim +182 drivers/block/paride/bpck.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  153  
^1da177e4c3f41 Linus Torvalds 2005-04-16  154  	switch (pi->mode) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  155  
^1da177e4c3f41 Linus Torvalds 2005-04-16  156        	case 0: WR(4,0x40);
^1da177e4c3f41 Linus Torvalds 2005-04-16  157  		w0(0x40); t2(2);
^1da177e4c3f41 Linus Torvalds 2005-04-16  158  		for (i=0;i<count;i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  159  		    t2(4); l = r1();
^1da177e4c3f41 Linus Torvalds 2005-04-16  160  		    t2(4); h = r1();
^1da177e4c3f41 Linus Torvalds 2005-04-16  161  		    buf[i] = j44(l,h);
^1da177e4c3f41 Linus Torvalds 2005-04-16  162  		}
^1da177e4c3f41 Linus Torvalds 2005-04-16  163  		WR(4,0);
^1da177e4c3f41 Linus Torvalds 2005-04-16  164  		break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  165  
^1da177e4c3f41 Linus Torvalds 2005-04-16  166  	case 1: WR(4,0x50);
^1da177e4c3f41 Linus Torvalds 2005-04-16  167  		w0(0x40); t2(2); t2(0x20);
^1da177e4c3f41 Linus Torvalds 2005-04-16  168        	        for(i=0;i<count;i++) { t2(4); buf[i] = r0(); }
^1da177e4c3f41 Linus Torvalds 2005-04-16  169  	        t2(1); t2(0x20);
^1da177e4c3f41 Linus Torvalds 2005-04-16  170  	        WR(4,0x10);
^1da177e4c3f41 Linus Torvalds 2005-04-16  171  		break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  172  
^1da177e4c3f41 Linus Torvalds 2005-04-16  173  	case 2: WR(4,0x48);
^1da177e4c3f41 Linus Torvalds 2005-04-16  174  		w0(0x40); w2(9); w2(0); w2(0x20);
^1da177e4c3f41 Linus Torvalds 2005-04-16  175  		for (i=0;i<count;i++) buf[i] = r4();
^1da177e4c3f41 Linus Torvalds 2005-04-16  176  		w2(0);
^1da177e4c3f41 Linus Torvalds 2005-04-16  177  		WR(4,8);
^1da177e4c3f41 Linus Torvalds 2005-04-16  178  		break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  179  
^1da177e4c3f41 Linus Torvalds 2005-04-16  180          case 3: WR(4,0x48);
^1da177e4c3f41 Linus Torvalds 2005-04-16  181                  w0(0x40); w2(9); w2(0); w2(0x20);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @182                  for (i=0;i<count/2;i++) ((u16 *)buf)[i] = r4w();
^1da177e4c3f41 Linus Torvalds 2005-04-16  183                  w2(0);
^1da177e4c3f41 Linus Torvalds 2005-04-16  184                  WR(4,8);
^1da177e4c3f41 Linus Torvalds 2005-04-16  185                  break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  186  
^1da177e4c3f41 Linus Torvalds 2005-04-16  187          case 4: WR(4,0x48);
^1da177e4c3f41 Linus Torvalds 2005-04-16  188                  w0(0x40); w2(9); w2(0); w2(0x20);
^1da177e4c3f41 Linus Torvalds 2005-04-16  189                  for (i=0;i<count/4;i++) ((u32 *)buf)[i] = r4l();
^1da177e4c3f41 Linus Torvalds 2005-04-16  190                  w2(0);
^1da177e4c3f41 Linus Torvalds 2005-04-16  191                  WR(4,8);
^1da177e4c3f41 Linus Torvalds 2005-04-16  192                  break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  193  
^1da177e4c3f41 Linus Torvalds 2005-04-16  194  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  195  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  196  

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

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

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (105060 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ