drivers/ata/pata_parport/friq.c:112:63: sparse: sparse: cast to restricted __le16

From: kernel test robot
Date: Tue Jan 30 2024 - 05:33:17 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 861c0981648f5b64c86fd028ee622096eb7af05a
commit: 72f2b0b2185099dce354c805009f591dda3ab73d drivers/block: Move PARIDE protocol modules to drivers/ata/pata_parport
date: 12 months ago
config: m68k-randconfig-r123-20240129 (https://download.01.org/0day-ci/archive/20240130/202401301838.JDzCSLYe-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240130/202401301838.JDzCSLYe-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401301838.JDzCSLYe-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/ata/pata_parport/friq.c:112:63: sparse: sparse: cast to restricted __le16
>> drivers/ata/pata_parport/friq.c:112:63: sparse: sparse: cast to restricted __le16
>> drivers/ata/pata_parport/friq.c:112:63: sparse: sparse: cast to restricted __le16
>> drivers/ata/pata_parport/friq.c:112:63: sparse: sparse: cast to restricted __le16
drivers/ata/pata_parport/friq.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 +112 drivers/ata/pata_parport/friq.c

^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 80
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 81 switch(pi->mode) {
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 82
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 83 case 0: CMD(regr);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 84 for (k=0;k<count;k++) {
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 85 w2(6); l = r1();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 86 w2(4); h = r1();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 87 buf[k] = j44(l,h);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 88 }
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 89 w2(4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 90 break;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 91
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 92 case 1: ph = 2;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 93 CMD(regr+0xc0);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 94 w0(0xff);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 95 for (k=0;k<count;k++) {
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 96 w2(0xa4 + ph);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 97 buf[k] = r0();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 98 ph = 2 - ph;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 99 }
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 100 w2(0xac); w2(0xa4); w2(4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 101 break;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 102
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 103 case 2: CMD(regr+0x80);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 104 for (k=0;k<count-2;k++) buf[k] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 105 w2(0xac); w2(0xa4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 106 buf[count-2] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 107 buf[count-1] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 108 w2(4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 109 break;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 110
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 111 case 3: CMD(regr+0x80);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 @112 for (k=0;k<(count/2)-1;k++) ((u16 *)buf)[k] = r4w();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 113 w2(0xac); w2(0xa4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 114 buf[count-2] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 115 buf[count-1] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 116 w2(4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 117 break;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 118
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 119 case 4: CMD(regr+0x80);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 120 for (k=0;k<(count/4)-1;k++) ((u32 *)buf)[k] = r4l();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 121 buf[count-4] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 122 buf[count-3] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 123 w2(0xac); w2(0xa4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 124 buf[count-2] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 125 buf[count-1] = r4();
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 126 w2(4);
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 127 break;
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 128
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 129 }
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 130 }
^1da177e4c3f41 drivers/block/paride/friq.c Linus Torvalds 2005-04-16 131

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

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki