[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007172041.Zz1eNB2Y%lkp@intel.com>
Date: Fri, 17 Jul 2020 20:51:44 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/misc/cxl/flash.c:294:42: sparse: sparse: incorrect type in
argument 2 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8882572675c1bb1cc544f4e229a11661f1fc52e4
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: powerpc64-randconfig-s031-20200717 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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.2-49-g707c5017-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/misc/cxl/flash.c:95:9: sparse: sparse: cast to restricted __be32
drivers/misc/cxl/flash.c:243:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] version @@ got restricted __be16 [usertype] @@
drivers/misc/cxl/flash.c:243:33: sparse: expected unsigned short [usertype] version
drivers/misc/cxl/flash.c:243:33: sparse: got restricted __be16 [usertype]
drivers/misc/cxl/flash.c:244:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] vendor @@ got restricted __be16 [usertype] @@
drivers/misc/cxl/flash.c:244:32: sparse: expected unsigned short [usertype] vendor
drivers/misc/cxl/flash.c:244:32: sparse: got restricted __be16 [usertype]
drivers/misc/cxl/flash.c:245:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] device @@ got restricted __be16 [usertype] @@
drivers/misc/cxl/flash.c:245:32: sparse: expected unsigned short [usertype] device
drivers/misc/cxl/flash.c:245:32: sparse: got restricted __be16 [usertype]
drivers/misc/cxl/flash.c:246:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] subsystem_vendor @@ got restricted __be16 [usertype] @@
drivers/misc/cxl/flash.c:246:42: sparse: expected unsigned short [usertype] subsystem_vendor
drivers/misc/cxl/flash.c:246:42: sparse: got restricted __be16 [usertype]
drivers/misc/cxl/flash.c:247:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] subsystem @@ got restricted __be16 [usertype] @@
drivers/misc/cxl/flash.c:247:35: sparse: expected unsigned short [usertype] subsystem
drivers/misc/cxl/flash.c:247:35: sparse: got restricted __be16 [usertype]
drivers/misc/cxl/flash.c:248:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] image_offset @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/flash.c:248:38: sparse: expected unsigned long long [usertype] image_offset
drivers/misc/cxl/flash.c:248:38: sparse: got restricted __be64 [usertype]
drivers/misc/cxl/flash.c:249:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] image_length @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/flash.c:249:38: sparse: expected unsigned long long [usertype] image_length
drivers/misc/cxl/flash.c:249:38: sparse: got restricted __be64 [usertype]
>> drivers/misc/cxl/flash.c:294:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void *[assigned] from @@
>> drivers/misc/cxl/flash.c:294:42: sparse: expected void const [noderef] __user *from
drivers/misc/cxl/flash.c:294:42: sparse: got void *[assigned] from
drivers/misc/cxl/flash.c:298:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] phys_addr @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/flash.c:298:33: sparse: expected unsigned long long [usertype] phys_addr
drivers/misc/cxl/flash.c:298:33: sparse: got restricted __be64 [usertype]
drivers/misc/cxl/flash.c:299:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/flash.c:299:27: sparse: expected unsigned long long [usertype] len
drivers/misc/cxl/flash.c:299:27: sparse: got restricted __be64 [usertype]
drivers/misc/cxl/flash.c:301:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/flash.c:301:35: sparse: expected unsigned long long [usertype] len
drivers/misc/cxl/flash.c:301:35: sparse: got restricted __be64 [usertype]
--
drivers/misc/cxl/guest.c:104:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] phys_addr @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/guest.c:104:33: sparse: expected unsigned long long [usertype] phys_addr
drivers/misc/cxl/guest.c:104:33: sparse: got restricted __be64 [usertype]
drivers/misc/cxl/guest.c:105:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/guest.c:105:27: sparse: expected unsigned long long [usertype] len
drivers/misc/cxl/guest.c:105:27: sparse: got restricted __be64 [usertype]
drivers/misc/cxl/guest.c:107:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
drivers/misc/cxl/guest.c:107:35: sparse: expected unsigned long long [usertype] len
drivers/misc/cxl/guest.c:107:35: sparse: got restricted __be64 [usertype]
>> drivers/misc/cxl/guest.c:439:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short const volatile [noderef] [usertype] __iomem *addr @@ got unsigned short [usertype] * @@
>> drivers/misc/cxl/guest.c:439:33: sparse: expected unsigned short const volatile [noderef] [usertype] __iomem *addr
drivers/misc/cxl/guest.c:439:33: sparse: got unsigned short [usertype] *
>> drivers/misc/cxl/guest.c:442:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got unsigned int * @@
>> drivers/misc/cxl/guest.c:442:33: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
drivers/misc/cxl/guest.c:442:33: sparse: got unsigned int *
>> drivers/misc/cxl/guest.c:445:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long const volatile [noderef] [usertype] __iomem *addr @@ got unsigned long long [usertype] * @@
>> drivers/misc/cxl/guest.c:445:33: sparse: expected unsigned long long const volatile [noderef] [usertype] __iomem *addr
drivers/misc/cxl/guest.c:445:33: sparse: got unsigned long long [usertype] *
drivers/misc/cxl/guest.c:533:23: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:533:23: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:533:23: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:534:23: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:534:23: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:534:23: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:536:31: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:536:31: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:536:31: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:539:23: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:539:23: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:539:23: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:540:23: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:540:23: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:540:23: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:542:31: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:542:31: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:542:31: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:545:31: sparse: sparse: invalid assignment: |=
drivers/misc/cxl/guest.c:545:31: sparse: left side has type restricted __be64
drivers/misc/cxl/guest.c:545:31: sparse: right side has type unsigned long long
drivers/misc/cxl/guest.c:548:31: sparse: sparse: cast from restricted __be64
--
arch/powerpc/platforms/pasemi/dma_lib.c:364:57: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned long long [usertype] dma_handle @@ got restricted gfp_t @@
arch/powerpc/platforms/pasemi/dma_lib.c:364:57: sparse: expected unsigned long long [usertype] dma_handle
arch/powerpc/platforms/pasemi/dma_lib.c:364:57: sparse: got restricted gfp_t
>> arch/powerpc/platforms/pasemi/dma_lib.c:481:16: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem *[assigned] ret @@
arch/powerpc/platforms/pasemi/dma_lib.c:481:16: sparse: expected void *
>> arch/powerpc/platforms/pasemi/dma_lib.c:481:16: sparse: got void [noderef] __iomem *[assigned] ret
>> arch/powerpc/platforms/pasemi/dma_lib.c:487:23: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
arch/powerpc/platforms/pasemi/dma_lib.c:487:23: sparse: expected void *
>> arch/powerpc/platforms/pasemi/dma_lib.c:487:23: sparse: got void [noderef] __iomem *
>> arch/powerpc/platforms/pasemi/dma_lib.c:524:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *static [toplevel] iob_regs @@ got void * @@
>> arch/powerpc/platforms/pasemi/dma_lib.c:524:18: sparse: expected void [noderef] __iomem *static [toplevel] iob_regs
arch/powerpc/platforms/pasemi/dma_lib.c:524:18: sparse: got void *
>> arch/powerpc/platforms/pasemi/dma_lib.c:533:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *static [toplevel] dma_regs @@ got void * @@
>> arch/powerpc/platforms/pasemi/dma_lib.c:533:18: sparse: expected void [noderef] __iomem *static [toplevel] dma_regs
arch/powerpc/platforms/pasemi/dma_lib.c:533:18: sparse: got void *
>> arch/powerpc/platforms/pasemi/dma_lib.c:546:34: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem * @@ got void * @@
>> arch/powerpc/platforms/pasemi/dma_lib.c:546:34: sparse: expected void [noderef] __iomem *
arch/powerpc/platforms/pasemi/dma_lib.c:546:34: sparse: got void *
arch/powerpc/platforms/pasemi/dma_lib.c:553:34: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem * @@ got void * @@
arch/powerpc/platforms/pasemi/dma_lib.c:553:34: sparse: expected void [noderef] __iomem *
arch/powerpc/platforms/pasemi/dma_lib.c:553:34: sparse: got void *
>> arch/powerpc/platforms/pasemi/dma_lib.c:565:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct pasdma_status *static [toplevel] dma_status @@ got void [noderef] __iomem * @@
arch/powerpc/platforms/pasemi/dma_lib.c:565:20: sparse: expected struct pasdma_status *static [toplevel] dma_status
arch/powerpc/platforms/pasemi/dma_lib.c:565:20: sparse: got void [noderef] __iomem *
--
arch/powerpc/platforms/cell/spu_syscalls.c:154:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> arch/powerpc/platforms/cell/spu_syscalls.c:154:9: sparse: struct spufs_calls [noderef] __rcu *
arch/powerpc/platforms/cell/spu_syscalls.c:154:9: sparse: struct spufs_calls *
arch/powerpc/platforms/cell/spu_syscalls.c:162:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
arch/powerpc/platforms/cell/spu_syscalls.c:162:9: sparse: struct spufs_calls [noderef] __rcu *
arch/powerpc/platforms/cell/spu_syscalls.c:162:9: sparse: struct spufs_calls *
--
>> arch/powerpc/platforms/cell/spufs/file.c:277:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got char * @@
>> arch/powerpc/platforms/cell/spufs/file.c:277:41: sparse: expected void volatile [noderef] __iomem *d
arch/powerpc/platforms/cell/spufs/file.c:277:41: sparse: got char *
>> arch/powerpc/platforms/cell/spufs/file.c:279:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *s @@ got char * @@
>> arch/powerpc/platforms/cell/spufs/file.c:279:48: sparse: expected void const volatile [noderef] __iomem *s
arch/powerpc/platforms/cell/spufs/file.c:279:48: sparse: got char *
arch/powerpc/platforms/cell/spufs/file.c:2442:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got int [assigned] rc @@
arch/powerpc/platforms/cell/spufs/file.c:2442:24: sparse: expected restricted __poll_t
arch/powerpc/platforms/cell/spufs/file.c:2442:24: sparse: got int [assigned] rc
--
>> arch/powerpc/platforms/ps3/gelic_udbg.c:127:53: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *start @@ got struct debug_block [noderef] __iomem * @@
arch/powerpc/platforms/ps3/gelic_udbg.c:127:53: sparse: expected void *start
>> arch/powerpc/platforms/ps3/gelic_udbg.c:127:53: sparse: got struct debug_block [noderef] __iomem *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:130:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got struct debug_block [noderef] __iomem * @@
arch/powerpc/platforms/ps3/gelic_udbg.c:130:17: sparse: expected void *
arch/powerpc/platforms/ps3/gelic_udbg.c:130:17: sparse: got struct debug_block [noderef] __iomem *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:132:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem buf_addr @@ got unsigned long long @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:132:28: sparse: expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem buf_addr
arch/powerpc/platforms/ps3/gelic_udbg.c:132:28: sparse: got unsigned long long
>> arch/powerpc/platforms/ps3/gelic_udbg.c:144:18: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:144:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ethhdr [noderef] __iomem *static [toplevel] h_eth @@ got struct ethhdr * @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:144:15: sparse: expected struct ethhdr [noderef] __iomem *static [toplevel] h_eth
arch/powerpc/platforms/ps3/gelic_udbg.c:144:15: sparse: got struct ethhdr *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:146:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned char [usertype] *addr @@ got unsigned char [noderef] __iomem * @@
arch/powerpc/platforms/ps3/gelic_udbg.c:146:28: sparse: expected unsigned char [usertype] *addr
>> arch/powerpc/platforms/ps3/gelic_udbg.c:146:28: sparse: got unsigned char [noderef] __iomem *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:147:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got unsigned char [noderef] __iomem ( * )[6] @@
arch/powerpc/platforms/ps3/gelic_udbg.c:147:17: sparse: expected void *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:147:17: sparse: got unsigned char [noderef] __iomem ( * )[6]
>> arch/powerpc/platforms/ps3/gelic_udbg.c:156:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem h_proto @@ got int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:156:31: sparse: expected restricted __be16 [noderef] [usertype] __iomem h_proto
arch/powerpc/platforms/ps3/gelic_udbg.c:156:31: sparse: got int
arch/powerpc/platforms/ps3/gelic_udbg.c:159:27: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:159:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vlan_hdr [noderef] __iomem *static [toplevel] h_vlan @@ got struct vlan_hdr * @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:159:24: sparse: expected struct vlan_hdr [noderef] __iomem *static [toplevel] h_vlan
arch/powerpc/platforms/ps3/gelic_udbg.c:159:24: sparse: got struct vlan_hdr *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:160:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem h_vlan_TCI @@ got unsigned long long [addressable] [usertype] vlan_id @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:160:36: sparse: expected restricted __be16 [noderef] [usertype] __iomem h_vlan_TCI
arch/powerpc/platforms/ps3/gelic_udbg.c:160:36: sparse: got unsigned long long [addressable] [usertype] vlan_id
>> arch/powerpc/platforms/ps3/gelic_udbg.c:161:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem h_vlan_encapsulated_proto @@ got int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:161:51: sparse: expected restricted __be16 [noderef] [usertype] __iomem h_vlan_encapsulated_proto
arch/powerpc/platforms/ps3/gelic_udbg.c:161:51: sparse: got int
arch/powerpc/platforms/ps3/gelic_udbg.c:162:25: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:162:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct iphdr [noderef] __iomem *static [toplevel] h_ip @@ got struct iphdr * @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:162:22: sparse: expected struct iphdr [noderef] __iomem *static [toplevel] h_ip
arch/powerpc/platforms/ps3/gelic_udbg.c:162:22: sparse: got struct iphdr *
arch/powerpc/platforms/ps3/gelic_udbg.c:164:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem h_proto @@ got int @@
arch/powerpc/platforms/ps3/gelic_udbg.c:164:31: sparse: expected restricted __be16 [noderef] [usertype] __iomem h_proto
arch/powerpc/platforms/ps3/gelic_udbg.c:164:31: sparse: got int
arch/powerpc/platforms/ps3/gelic_udbg.c:165:25: sparse: sparse: cast removes address space '__iomem' of expression
arch/powerpc/platforms/ps3/gelic_udbg.c:165:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct iphdr [noderef] __iomem *static [toplevel] h_ip @@ got struct iphdr * @@
arch/powerpc/platforms/ps3/gelic_udbg.c:165:22: sparse: expected struct iphdr [noderef] __iomem *static [toplevel] h_ip
arch/powerpc/platforms/ps3/gelic_udbg.c:165:22: sparse: got struct iphdr *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:174:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [noderef] [usertype] __iomem daddr @@ got unsigned int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:174:21: sparse: expected restricted __be32 [noderef] [usertype] __iomem daddr
arch/powerpc/platforms/ps3/gelic_udbg.c:174:21: sparse: got unsigned int
arch/powerpc/platforms/ps3/gelic_udbg.c:177:18: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:177:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct udphdr [noderef] __iomem *static [toplevel] h_udp @@ got struct udphdr * @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:177:15: sparse: expected struct udphdr [noderef] __iomem *static [toplevel] h_udp
arch/powerpc/platforms/ps3/gelic_udbg.c:177:15: sparse: got struct udphdr *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:178:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem source @@ got int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:178:23: sparse: expected restricted __be16 [noderef] [usertype] __iomem source
arch/powerpc/platforms/ps3/gelic_udbg.c:178:23: sparse: got int
>> arch/powerpc/platforms/ps3/gelic_udbg.c:179:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem dest @@ got int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:179:21: sparse: expected restricted __be16 [noderef] [usertype] __iomem dest
arch/powerpc/platforms/ps3/gelic_udbg.c:179:21: sparse: got int
arch/powerpc/platforms/ps3/gelic_udbg.c:181:25: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:181:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *static [toplevel] pmsg @@ got char * @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:181:22: sparse: expected char [noderef] __iomem *static [toplevel] pmsg
arch/powerpc/platforms/ps3/gelic_udbg.c:181:22: sparse: got char *
>> arch/powerpc/platforms/ps3/gelic_udbg.c:198:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem buf_size @@ got int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:198:28: sparse: expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem buf_size
arch/powerpc/platforms/ps3/gelic_udbg.c:198:28: sparse: got int
>> arch/powerpc/platforms/ps3/gelic_udbg.c:199:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem tot_len @@ got unsigned long @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:199:23: sparse: expected restricted __be16 [noderef] [usertype] __iomem tot_len
arch/powerpc/platforms/ps3/gelic_udbg.c:199:23: sparse: got unsigned long
>> arch/powerpc/platforms/ps3/gelic_udbg.c:201:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [noderef] [usertype] __iomem len @@ got unsigned long @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:201:20: sparse: expected restricted __be16 [noderef] [usertype] __iomem len
arch/powerpc/platforms/ps3/gelic_udbg.c:201:20: sparse: got unsigned long
arch/powerpc/platforms/ps3/gelic_udbg.c:205:14: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/ps3/gelic_udbg.c:208:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __sum16 [noderef] [usertype] __iomem check @@ got unsigned int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:208:21: sparse: expected restricted __sum16 [noderef] [usertype] __iomem check
arch/powerpc/platforms/ps3/gelic_udbg.c:208:21: sparse: got unsigned int
>> arch/powerpc/platforms/ps3/gelic_udbg.c:210:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem dmac_cmd_status @@ got unsigned int @@
>> arch/powerpc/platforms/ps3/gelic_udbg.c:210:35: sparse: expected restricted __be32 static [addressable] [noderef] [toplevel] [usertype] __iomem dmac_cmd_status
arch/powerpc/platforms/ps3/gelic_udbg.c:210:35: sparse: got unsigned int
arch/powerpc/platforms/ps3/gelic_udbg.c:219:26: sparse: sparse: restricted __be32 degrades to integer
arch/powerpc/platforms/ps3/gelic_udbg.c:169:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:170:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:171:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:172:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:173:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:203:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:212:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:213:9: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:219:17: sparse: sparse: dereference of noderef expression
arch/powerpc/platforms/ps3/gelic_udbg.c:226:15: sparse: sparse: dereference of noderef expression
vim +294 drivers/misc/cxl/flash.c
594ff7d067ca42 Christophe Lombard 2016-03-04 226
594ff7d067ca42 Christophe Lombard 2016-03-04 227 static int handle_image(struct cxl *adapter, int operation,
594ff7d067ca42 Christophe Lombard 2016-03-04 228 long (*fct)(u64, u64, u64, u64 *),
594ff7d067ca42 Christophe Lombard 2016-03-04 229 struct cxl_adapter_image *ai)
594ff7d067ca42 Christophe Lombard 2016-03-04 230 {
594ff7d067ca42 Christophe Lombard 2016-03-04 231 size_t mod, s_copy, len_chunk = 0;
594ff7d067ca42 Christophe Lombard 2016-03-04 232 struct ai_header *header = NULL;
594ff7d067ca42 Christophe Lombard 2016-03-04 233 unsigned int entries = 0, i;
594ff7d067ca42 Christophe Lombard 2016-03-04 234 void *dest, *from;
594ff7d067ca42 Christophe Lombard 2016-03-04 235 int rc = 0, need_header;
594ff7d067ca42 Christophe Lombard 2016-03-04 236
594ff7d067ca42 Christophe Lombard 2016-03-04 237 /* base adapter image header */
594ff7d067ca42 Christophe Lombard 2016-03-04 238 need_header = (ai->flags & CXL_AI_NEED_HEADER);
594ff7d067ca42 Christophe Lombard 2016-03-04 239 if (need_header) {
594ff7d067ca42 Christophe Lombard 2016-03-04 240 header = kzalloc(sizeof(struct ai_header), GFP_KERNEL);
594ff7d067ca42 Christophe Lombard 2016-03-04 241 if (!header)
594ff7d067ca42 Christophe Lombard 2016-03-04 242 return -ENOMEM;
594ff7d067ca42 Christophe Lombard 2016-03-04 243 header->version = cpu_to_be16(1);
594ff7d067ca42 Christophe Lombard 2016-03-04 244 header->vendor = cpu_to_be16(adapter->guest->vendor);
594ff7d067ca42 Christophe Lombard 2016-03-04 245 header->device = cpu_to_be16(adapter->guest->device);
594ff7d067ca42 Christophe Lombard 2016-03-04 246 header->subsystem_vendor = cpu_to_be16(adapter->guest->subsystem_vendor);
594ff7d067ca42 Christophe Lombard 2016-03-04 @247 header->subsystem = cpu_to_be16(adapter->guest->subsystem);
594ff7d067ca42 Christophe Lombard 2016-03-04 248 header->image_offset = cpu_to_be64(CXL_AI_HEADER_SIZE);
594ff7d067ca42 Christophe Lombard 2016-03-04 249 header->image_length = cpu_to_be64(ai->len_image);
594ff7d067ca42 Christophe Lombard 2016-03-04 250 }
594ff7d067ca42 Christophe Lombard 2016-03-04 251
594ff7d067ca42 Christophe Lombard 2016-03-04 252 /* number of entries in the list */
594ff7d067ca42 Christophe Lombard 2016-03-04 253 len_chunk = ai->len_data;
594ff7d067ca42 Christophe Lombard 2016-03-04 254 if (need_header)
594ff7d067ca42 Christophe Lombard 2016-03-04 255 len_chunk += CXL_AI_HEADER_SIZE;
594ff7d067ca42 Christophe Lombard 2016-03-04 256
594ff7d067ca42 Christophe Lombard 2016-03-04 257 entries = len_chunk / CXL_AI_BUFFER_SIZE;
594ff7d067ca42 Christophe Lombard 2016-03-04 258 mod = len_chunk % CXL_AI_BUFFER_SIZE;
594ff7d067ca42 Christophe Lombard 2016-03-04 259 if (mod)
594ff7d067ca42 Christophe Lombard 2016-03-04 260 entries++;
594ff7d067ca42 Christophe Lombard 2016-03-04 261
594ff7d067ca42 Christophe Lombard 2016-03-04 262 if (entries > CXL_AI_MAX_ENTRIES) {
594ff7d067ca42 Christophe Lombard 2016-03-04 263 rc = -EINVAL;
594ff7d067ca42 Christophe Lombard 2016-03-04 264 goto err;
594ff7d067ca42 Christophe Lombard 2016-03-04 265 }
594ff7d067ca42 Christophe Lombard 2016-03-04 266
594ff7d067ca42 Christophe Lombard 2016-03-04 267 /* < -- MAX_CHUNK_SIZE = 4096 * 256 = 1048576 bytes -->
594ff7d067ca42 Christophe Lombard 2016-03-04 268 * chunk 0 ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 269 * | header | data |
594ff7d067ca42 Christophe Lombard 2016-03-04 270 * ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 271 * chunk 1 ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 272 * | data |
594ff7d067ca42 Christophe Lombard 2016-03-04 273 * ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 274 * ....
594ff7d067ca42 Christophe Lombard 2016-03-04 275 * chunk n ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 276 * | data |
594ff7d067ca42 Christophe Lombard 2016-03-04 277 * ----------------------------------------------------
594ff7d067ca42 Christophe Lombard 2016-03-04 278 */
594ff7d067ca42 Christophe Lombard 2016-03-04 279 from = (void *) ai->data;
594ff7d067ca42 Christophe Lombard 2016-03-04 280 for (i = 0; i < entries; i++) {
594ff7d067ca42 Christophe Lombard 2016-03-04 281 dest = buffer[i];
594ff7d067ca42 Christophe Lombard 2016-03-04 282 s_copy = CXL_AI_BUFFER_SIZE;
594ff7d067ca42 Christophe Lombard 2016-03-04 283
594ff7d067ca42 Christophe Lombard 2016-03-04 284 if ((need_header) && (i == 0)) {
594ff7d067ca42 Christophe Lombard 2016-03-04 285 /* add adapter image header */
594ff7d067ca42 Christophe Lombard 2016-03-04 286 memcpy(buffer[i], header, sizeof(struct ai_header));
594ff7d067ca42 Christophe Lombard 2016-03-04 287 s_copy = CXL_AI_BUFFER_SIZE - CXL_AI_HEADER_SIZE;
594ff7d067ca42 Christophe Lombard 2016-03-04 288 dest += CXL_AI_HEADER_SIZE; /* image offset */
594ff7d067ca42 Christophe Lombard 2016-03-04 289 }
594ff7d067ca42 Christophe Lombard 2016-03-04 290 if ((i == (entries - 1)) && mod)
594ff7d067ca42 Christophe Lombard 2016-03-04 291 s_copy = mod;
594ff7d067ca42 Christophe Lombard 2016-03-04 292
594ff7d067ca42 Christophe Lombard 2016-03-04 293 /* copy data */
594ff7d067ca42 Christophe Lombard 2016-03-04 @294 if (copy_from_user(dest, from, s_copy))
594ff7d067ca42 Christophe Lombard 2016-03-04 295 goto err;
594ff7d067ca42 Christophe Lombard 2016-03-04 296
594ff7d067ca42 Christophe Lombard 2016-03-04 297 /* fill in the list */
594ff7d067ca42 Christophe Lombard 2016-03-04 298 le[i].phys_addr = cpu_to_be64(virt_to_phys(buffer[i]));
594ff7d067ca42 Christophe Lombard 2016-03-04 299 le[i].len = cpu_to_be64(CXL_AI_BUFFER_SIZE);
594ff7d067ca42 Christophe Lombard 2016-03-04 300 if ((i == (entries - 1)) && mod)
594ff7d067ca42 Christophe Lombard 2016-03-04 301 le[i].len = cpu_to_be64(mod);
594ff7d067ca42 Christophe Lombard 2016-03-04 302 from += s_copy;
594ff7d067ca42 Christophe Lombard 2016-03-04 303 }
594ff7d067ca42 Christophe Lombard 2016-03-04 304 pr_devel("%s (op: %i, need header: %i, entries: %i, token: %#llx)\n",
594ff7d067ca42 Christophe Lombard 2016-03-04 305 __func__, operation, need_header, entries, continue_token);
594ff7d067ca42 Christophe Lombard 2016-03-04 306
594ff7d067ca42 Christophe Lombard 2016-03-04 307 /*
594ff7d067ca42 Christophe Lombard 2016-03-04 308 * download/validate the adapter image to the coherent
594ff7d067ca42 Christophe Lombard 2016-03-04 309 * platform facility
594ff7d067ca42 Christophe Lombard 2016-03-04 310 */
594ff7d067ca42 Christophe Lombard 2016-03-04 311 rc = fct(adapter->guest->handle, virt_to_phys(le), entries,
594ff7d067ca42 Christophe Lombard 2016-03-04 312 &continue_token);
594ff7d067ca42 Christophe Lombard 2016-03-04 313 if (rc == 0) /* success of download/validation operation */
594ff7d067ca42 Christophe Lombard 2016-03-04 314 continue_token = 0;
594ff7d067ca42 Christophe Lombard 2016-03-04 315
594ff7d067ca42 Christophe Lombard 2016-03-04 316 err:
594ff7d067ca42 Christophe Lombard 2016-03-04 317 kfree(header);
594ff7d067ca42 Christophe Lombard 2016-03-04 318
594ff7d067ca42 Christophe Lombard 2016-03-04 319 return rc;
594ff7d067ca42 Christophe Lombard 2016-03-04 320 }
594ff7d067ca42 Christophe Lombard 2016-03-04 321
:::::: The code at line 294 was first introduced by commit
:::::: 594ff7d067ca42676e27e2a7b5dcc0ff039d08ca cxl: Support to flash a new image on the adapter from a guest
:::::: TO: Christophe Lombard <clombard@...ux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@...erman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (31352 bytes)
Powered by blists - more mailing lists