lkml.org 
[lkml]   [2020]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/atm/iphase.c:149:16: sparse: sparse: cast removes address space '__iomem' of expression
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 35e884f89df4c48566d745dc5a97a0d058d04263
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 2 weeks ago
config: i386-randconfig-s001-20200705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-3-gfa153962-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

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


sparse warnings: (new ones prefixed by >>)

>> drivers/atm/iphase.c:149:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:153:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:165:56: sparse: sparse: invalid assignment: |=
drivers/atm/iphase.c:165:56: sparse: left side has type restricted __be16
drivers/atm/iphase.c:165:56: sparse: right side has type int
drivers/atm/iphase.c:203:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:220:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:228:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:241:29: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:242:29: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:279:20: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:384:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:444:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:446:20: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:529:19: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:583:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2976:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:3050:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] protocol @@ got int vci @@
drivers/atm/iphase.c:3050:23: sparse: expected restricted __be16 [usertype] protocol
drivers/atm/iphase.c:3050:23: sparse: got int vci
drivers/atm/iphase.c:668:17: sparse: sparse: restricted __be16 degrades to integer
drivers/atm/iphase.c:1185:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] protocol @@ got int [assigned] desc @@
drivers/atm/iphase.c:1185:23: sparse: expected restricted __be16 [usertype] protocol
drivers/atm/iphase.c:1185:23: sparse: got int [assigned] desc
drivers/atm/iphase.c:1297:12: sparse: sparse: incorrect type in assignment (different base types) @@ expected int desc @@ got restricted __be16 [usertype] protocol @@
drivers/atm/iphase.c:1297:12: sparse: expected int desc
drivers/atm/iphase.c:1297:12: sparse: got restricted __be16 [usertype] protocol
drivers/atm/iphase.c:1506:24: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1553:24: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1565:20: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1582:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1735:34: sparse: sparse: invalid assignment: |=
drivers/atm/iphase.c:1735:34: sparse: left side has type restricted __be16
drivers/atm/iphase.c:1735:34: sparse: right side has type int
drivers/atm/iphase.c:1812:15: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1813:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1966:24: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2022:22: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2049:22: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2112:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2128:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2129:15: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2130:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:16: sparse: sparse: cast to restricted __le32
drivers/atm/iphase.c:2278:14: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] mac1 @@ got restricted __be32 [usertype] @@
drivers/atm/iphase.c:2278:14: sparse: expected unsigned int [usertype] mac1
drivers/atm/iphase.c:2278:14: sparse: got restricted __be32 [usertype]
drivers/atm/iphase.c:2280:16: sparse: sparse: cast to restricted __le16
drivers/atm/iphase.c:2280:16: sparse: sparse: cast to restricted __le16
drivers/atm/iphase.c:2280:16: sparse: sparse: cast to restricted __le16
drivers/atm/iphase.c:2280:16: sparse: sparse: cast to restricted __le16
drivers/atm/iphase.c:2280:14: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] mac2 @@ got restricted __be16 [usertype] @@
drivers/atm/iphase.c:2280:14: sparse: expected unsigned short [usertype] mac2
drivers/atm/iphase.c:2280:14: sparse: got restricted __be16 [usertype]
drivers/atm/iphase.c:2666:24: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:2670:24: sparse: sparse: cast removes address space '__iomem' of expression
drivers/atm/iphase.c:1132:25: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1137:30: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1147:29: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1168:21: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1168:57: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1169:21: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1169:57: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1395:10: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1408:18: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1490:17: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:1491:17: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:2677:15: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:2678:15: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3006:9: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3009:9: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3010:9: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3020:35: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3021:51: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3038:36: sparse: sparse: dereference of noderef expression
drivers/atm/iphase.c:3039:11: sparse: sparse: dereference of noderef expression

vim +/__iomem +149 drivers/atm/iphase.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 142
^1da177e4c3f41 Linus Torvalds 2005-04-16 143 u_short desc1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 144 u_short tcq_wr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 145 struct ia_vcc *iavcc_r = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 146
^1da177e4c3f41 Linus Torvalds 2005-04-16 147 tcq_wr = readl(dev->seg_reg+TCQ_WR_PTR) & 0xffff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 148 while (dev->host_tcq_wr != tcq_wr) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @149 desc1 = *(u_short *)(dev->seg_ram + dev->host_tcq_wr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 150 if (!desc1) ;
^1da177e4c3f41 Linus Torvalds 2005-04-16 151 else if (!dev->desc_tbl[desc1 -1].timestamp) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 152 IF_ABR(printk(" Desc %d is reset at %ld\n", desc1 -1, jiffies);)
^1da177e4c3f41 Linus Torvalds 2005-04-16 153 *(u_short *) (dev->seg_ram + dev->host_tcq_wr) = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 154 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 155 else if (dev->desc_tbl[desc1 -1].timestamp) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 156 if (!(iavcc_r = dev->desc_tbl[desc1 -1].iavcc)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 157 printk("IA: Fatal err in get_desc\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 158 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 159 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 160 iavcc_r->vc_desc_cnt--;
^1da177e4c3f41 Linus Torvalds 2005-04-16 161 dev->desc_tbl[desc1 -1].timestamp = 0;
849e8caa477d72 David Howells 2008-07-30 162 IF_EVENT(printk("ia_hack: return_q skb = 0x%p desc = %d\n",
849e8caa477d72 David Howells 2008-07-30 163 dev->desc_tbl[desc1 -1].txskb, desc1);)
^1da177e4c3f41 Linus Torvalds 2005-04-16 164 if (iavcc_r->pcr < dev->rate_limit) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 165 IA_SKB_STATE (dev->desc_tbl[desc1-1].txskb) |= IA_TX_DONE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 166 if (ia_enque_rtn_q(&dev->tx_return_q, dev->desc_tbl[desc1 -1]) < 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 167 printk("ia_hack_tcq: No memory available\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 168 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 169 dev->desc_tbl[desc1 -1].iavcc = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 170 dev->desc_tbl[desc1 -1].txskb = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 171 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 172 dev->host_tcq_wr += 2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 173 if (dev->host_tcq_wr > dev->ffL.tcq_ed)
^1da177e4c3f41 Linus Torvalds 2005-04-16 174 dev->host_tcq_wr = dev->ffL.tcq_st;
^1da177e4c3f41 Linus Torvalds 2005-04-16 175 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 176 } /* ia_hack_tcq */
^1da177e4c3f41 Linus Torvalds 2005-04-16 177

:::::: The code at line 149 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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-07-05 11:31    [W:0.673 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site