All of lore.kernel.org
 help / color / mirror / Atom feed
* [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-08  2:52 kernel test robot
  2020-07-08  7:13 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-07-08  2:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 38169 bytes --]

tree:   https://github.com/krzk/linux for-next/ioread-const-only-important-patches-v3
head:   642cfec5a0b4b2c092cc803b8b2100c2bbc3b80b
commit: 7e593a34879e675b9e9dd7903888b31e0847c12e [1/4] iomap: Constify ioreadX() iomem argument (as in generic implementation)
config: x86_64-randconfig-s022-20200707 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-31-gabbfd661-dirty
        git checkout 7e593a34879e675b9e9dd7903888b31e0847c12e
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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/pci/switch/switchtec.c:943:31: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
   drivers/pci/switch/switchtec.c:943:31: sparse:     expected unsigned int [noderef] [usertype] __iomem *
   drivers/pci/switch/switchtec.c:943:31: sparse:     got void *
   drivers/pci/switch/switchtec.c:951:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
   drivers/pci/switch/switchtec.c:951:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
   drivers/pci/switch/switchtec.c:951:39: sparse:     got void *
   drivers/pci/switch/switchtec.c:954:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
   drivers/pci/switch/switchtec.c:954:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
   drivers/pci/switch/switchtec.c:954:39: sparse:     got void *
   drivers/pci/switch/switchtec.c:1067:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct switchtec_ioctl_pff_port *up @@
   drivers/pci/switch/switchtec.c:1067:32: sparse:     expected void const [noderef] __user *from
   drivers/pci/switch/switchtec.c:1067:32: sparse:     got struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1072:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem * @@
   drivers/pci/switch/switchtec.c:1072:22: sparse:     expected struct part_cfg_regs *pcfg
   drivers/pci/switch/switchtec.c:1072:22: sparse:     got struct part_cfg_regs [noderef] __iomem *
>> drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
>> drivers/pci/switch/switchtec.c:1075:33: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1075:33: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1081:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1081:33: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1081:33: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1088:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1088:62: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1088:62: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1100:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got struct switchtec_ioctl_pff_port *up @@
   drivers/pci/switch/switchtec.c:1100:26: sparse:     expected void [noderef] __user *to
   drivers/pci/switch/switchtec.c:1100:26: sparse:     got struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1112:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct switchtec_ioctl_pff_port *up @@
   drivers/pci/switch/switchtec.c:1112:32: sparse:     expected void const [noderef] __user *from
   drivers/pci/switch/switchtec.c:1112:32: sparse:     got struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1116:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg @@
   drivers/pci/switch/switchtec.c:1116:22: sparse:     expected struct part_cfg_regs *pcfg
   drivers/pci/switch/switchtec.c:1116:22: sparse:     got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg
   drivers/pci/switch/switchtec.c:1118:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem * @@
   drivers/pci/switch/switchtec.c:1118:22: sparse:     expected struct part_cfg_regs *pcfg
   drivers/pci/switch/switchtec.c:1118:22: sparse:     got struct part_cfg_regs [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1124:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1124:35: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1124:35: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1127:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1127:35: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1127:35: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1134:56: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1134:56: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1134:56: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1138:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got struct switchtec_ioctl_pff_port *up @@
   drivers/pci/switch/switchtec.c:1138:26: sparse:     expected void [noderef] __user *to
   drivers/pci/switch/switchtec.c:1138:26: sparse:     got struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1171:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct switchtec_ioctl_pff_port *up @@     got void [noderef] __user *argp @@
   drivers/pci/switch/switchtec.c:1171:47: sparse:     expected struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1171:47: sparse:     got void [noderef] __user *argp
   drivers/pci/switch/switchtec.c:1174:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct switchtec_ioctl_pff_port *up @@     got void [noderef] __user *argp @@
   drivers/pci/switch/switchtec.c:1174:47: sparse:     expected struct switchtec_ioctl_pff_port *up
   drivers/pci/switch/switchtec.c:1174:47: sparse:     got void [noderef] __user *argp
   drivers/pci/switch/switchtec.c:1487:43: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg @@
   drivers/pci/switch/switchtec.c:1487:43: sparse:     expected struct part_cfg_regs *pcfg
   drivers/pci/switch/switchtec.c:1487:43: sparse:     got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg
   drivers/pci/switch/switchtec.c:1497:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1497:25: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1497:25: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1501:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1501:25: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1501:25: sparse:     got unsigned int *
   drivers/pci/switch/switchtec.c:1506:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
   drivers/pci/switch/switchtec.c:1506:54: sparse:     expected void const [noderef] __iomem *
   drivers/pci/switch/switchtec.c:1506:54: sparse:     got unsigned int *
--
   drivers/scsi/mvumi.c:81:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
   drivers/scsi/mvumi.c:81:52: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:81:52: sparse:     got void *
   drivers/scsi/mvumi.c:90:39: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void * @@     got void [noderef] __iomem * @@
   drivers/scsi/mvumi.c:90:39: sparse:     expected void *
   drivers/scsi/mvumi.c:90:39: sparse:     got void [noderef] __iomem *
   drivers/scsi/mvumi.c:210:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_l @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:210:34: sparse:     expected unsigned int [usertype] baseaddr_l
   drivers/scsi/mvumi.c:210:34: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:211:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_h @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:211:34: sparse:     expected unsigned int [usertype] baseaddr_h
   drivers/scsi/mvumi.c:211:34: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:213:17: sparse: sparse: invalid assignment: |=
   drivers/scsi/mvumi.c:213:17: sparse:    left side has type unsigned int
   drivers/scsi/mvumi.c:213:17: sparse:    right side has type restricted __le32
   drivers/scsi/mvumi.c:213:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] size @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:213:17: sparse:     expected unsigned int [usertype] size
   drivers/scsi/mvumi.c:213:17: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:242:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_l @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:242:26: sparse:     expected unsigned int [usertype] baseaddr_l
   drivers/scsi/mvumi.c:242:26: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:243:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_h @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:243:26: sparse:     expected unsigned int [usertype] baseaddr_h
   drivers/scsi/mvumi.c:243:26: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:245:9: sparse: sparse: invalid assignment: |=
   drivers/scsi/mvumi.c:245:9: sparse:    left side has type unsigned int
   drivers/scsi/mvumi.c:245:9: sparse:    right side has type restricted __le32
   drivers/scsi/mvumi.c:245:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] size @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:245:9: sparse:     expected unsigned int [usertype] size
   drivers/scsi/mvumi.c:245:9: sparse:     got restricted __le32 [usertype]
>> drivers/scsi/mvumi.c:407:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *inb_read_pointer @@
>> drivers/scsi/mvumi.c:407:40: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:407:40: sparse:     got void *inb_read_pointer
>> drivers/scsi/mvumi.c:429:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *ib_shadow @@
   drivers/scsi/mvumi.c:429:30: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:429:30: sparse:     got void *ib_shadow
   drivers/scsi/mvumi.c:458:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *ib_shadow @@
   drivers/scsi/mvumi.c:458:31: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:458:31: sparse:     got void *ib_shadow
   drivers/scsi/mvumi.c:459:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *inb_write_pointer @@
   drivers/scsi/mvumi.c:459:48: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:459:48: sparse:     got void *inb_write_pointer
>> drivers/scsi/mvumi.c:496:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *outb_copy_pointer @@
   drivers/scsi/mvumi.c:496:41: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:496:41: sparse:     got void *outb_copy_pointer
>> drivers/scsi/mvumi.c:497:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *ob_shadow @@
   drivers/scsi/mvumi.c:497:48: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:497:48: sparse:     got void *ob_shadow
>> drivers/scsi/mvumi.c:516:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *outb_read_pointer @@
   drivers/scsi/mvumi.c:516:33: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:516:33: sparse:     got void *outb_read_pointer
   drivers/scsi/mvumi.c:517:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *outb_copy_pointer @@
   drivers/scsi/mvumi.c:517:33: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:517:33: sparse:     got void *outb_copy_pointer
   drivers/scsi/mvumi.c:578:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_read_pointer @@
   drivers/scsi/mvumi.c:578:42: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:578:42: sparse:     got void *outb_read_pointer
   drivers/scsi/mvumi.c:585:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:585:26: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:585:26: sparse:     got void *enpointa_mask_reg
>> drivers/scsi/mvumi.c:586:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:586:26: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:586:26: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:589:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:589:40: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:589:40: sparse:     got void *pciea_to_arm_drbl_reg
>> drivers/scsi/mvumi.c:1281:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1281:28: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1281:28: sparse:     got void *arm_to_pciea_drbl_reg
   drivers/scsi/mvumi.c:1282:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1282:28: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1282:28: sparse:     got void *arm_to_pciea_drbl_reg
   drivers/scsi/mvumi.c:1284:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_mask_reg @@
   drivers/scsi/mvumi.c:1284:48: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1284:48: sparse:     got void *arm_to_pciea_mask_reg
>> drivers/scsi/mvumi.c:1285:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1285:28: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1285:28: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1286:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1286:28: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1286:28: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:612:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:612:26: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:612:26: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:613:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:613:28: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:613:28: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:615:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:615:46: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:615:46: sparse:     got void *pciea_to_arm_drbl_reg
   drivers/scsi/mvumi.c:624:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:624:36: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:624:36: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:670:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *reset_enable @@
   drivers/scsi/mvumi.c:670:32: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:670:32: sparse:     got void *reset_enable
   drivers/scsi/mvumi.c:671:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *reset_request @@
   drivers/scsi/mvumi.c:671:34: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:671:34: sparse:     got void *reset_request
   drivers/scsi/mvumi.c:673:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *reset_enable @@
   drivers/scsi/mvumi.c:673:35: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:673:35: sparse:     got void *reset_enable
   drivers/scsi/mvumi.c:674:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *reset_request @@
   drivers/scsi/mvumi.c:674:35: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:674:35: sparse:     got void *reset_request
>> drivers/scsi/mvumi.c:1100:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg0 @@
   drivers/scsi/mvumi.c:1100:36: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1100:36: sparse:     got void *arm_to_pciea_msg0
   drivers/scsi/mvumi.c:1115:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_msg1 @@
   drivers/scsi/mvumi.c:1115:52: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1115:52: sparse:     got void *pciea_to_arm_msg1
   drivers/scsi/mvumi.c:1116:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_msg0 @@
   drivers/scsi/mvumi.c:1116:39: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1116:39: sparse:     got void *pciea_to_arm_msg0
   drivers/scsi/mvumi.c:1117:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:1117:47: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1117:47: sparse:     got void *pciea_to_arm_drbl_reg
   drivers/scsi/mvumi.c:1122:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_msg1 @@
   drivers/scsi/mvumi.c:1122:45: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1122:45: sparse:     got void *pciea_to_arm_msg1
   drivers/scsi/mvumi.c:1124:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:1124:45: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1124:45: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:1127:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_msg0 @@
   drivers/scsi/mvumi.c:1127:39: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1127:39: sparse:     got void *pciea_to_arm_msg0
   drivers/scsi/mvumi.c:1128:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:1128:47: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1128:47: sparse:     got void *pciea_to_arm_drbl_reg
   drivers/scsi/mvumi.c:1168:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_msg0 @@
   drivers/scsi/mvumi.c:1168:39: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1168:39: sparse:     got void *pciea_to_arm_msg0
   drivers/scsi/mvumi.c:1169:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:1169:47: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1169:47: sparse:     got void *pciea_to_arm_drbl_reg
   drivers/scsi/mvumi.c:1174:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1174:36: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1174:36: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1176:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1176:36: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1176:36: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1177:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *ib_shadow @@
   drivers/scsi/mvumi.c:1177:50: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1177:50: sparse:     got void *ib_shadow
   drivers/scsi/mvumi.c:1180:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *inb_aval_count_basel @@
   drivers/scsi/mvumi.c:1180:45: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1180:45: sparse:     got void *inb_aval_count_basel
   drivers/scsi/mvumi.c:1182:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *inb_aval_count_baseh @@
   drivers/scsi/mvumi.c:1182:45: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1182:45: sparse:     got void *inb_aval_count_baseh
   drivers/scsi/mvumi.c:1188:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *ob_shadow @@
   drivers/scsi/mvumi.c:1188:61: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1188:61: sparse:     got void *ob_shadow
   drivers/scsi/mvumi.c:1190:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_copy_basel @@
   drivers/scsi/mvumi.c:1190:61: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1190:61: sparse:     got void *outb_copy_basel
   drivers/scsi/mvumi.c:1192:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_copy_baseh @@
   drivers/scsi/mvumi.c:1192:61: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1192:61: sparse:     got void *outb_copy_baseh
   drivers/scsi/mvumi.c:1244:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:1244:34: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1244:34: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:1248:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *pciea_to_arm_drbl_reg @@
   drivers/scsi/mvumi.c:1248:51: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1248:51: sparse:     got void *pciea_to_arm_drbl_reg
   drivers/scsi/mvumi.c:1256:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_msg1 @@
   drivers/scsi/mvumi.c:1256:42: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1256:42: sparse:     got void *arm_to_pciea_msg1
   drivers/scsi/mvumi.c:1849:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] src_low_addr @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:1849:35: sparse:     expected unsigned int [usertype] src_low_addr
   drivers/scsi/mvumi.c:1849:35: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:1851:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] src_high_addr @@     got restricted __le32 [usertype] @@
   drivers/scsi/mvumi.c:1851:36: sparse:     expected unsigned int [usertype] src_high_addr
   drivers/scsi/mvumi.c:1851:36: sparse:     got restricted __le32 [usertype]
   drivers/scsi/mvumi.c:1903:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_mask_reg @@
   drivers/scsi/mvumi.c:1903:48: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1903:48: sparse:     got void *arm_to_pciea_mask_reg
   drivers/scsi/mvumi.c:1904:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1904:29: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1904:29: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1906:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1906:29: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1906:29: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1918:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_mask_reg @@
   drivers/scsi/mvumi.c:1918:26: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1918:26: sparse:     got void *arm_to_pciea_mask_reg
   drivers/scsi/mvumi.c:1919:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1919:29: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1919:29: sparse:     got void *enpointa_mask_reg
   drivers/scsi/mvumi.c:1922:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *enpointa_mask_reg @@
   drivers/scsi/mvumi.c:1922:29: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1922:29: sparse:     got void *enpointa_mask_reg
>> drivers/scsi/mvumi.c:1931:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *main_int_cause_reg @@
   drivers/scsi/mvumi.c:1931:31: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1931:31: sparse:     got void *main_int_cause_reg
>> drivers/scsi/mvumi.c:1935:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *outb_isr_cause @@
   drivers/scsi/mvumi.c:1935:36: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1935:36: sparse:     got void *outb_isr_cause
   drivers/scsi/mvumi.c:1939:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_isr_cause @@
   drivers/scsi/mvumi.c:1939:61: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1939:61: sparse:     got void *outb_isr_cause
   drivers/scsi/mvumi.c:1945:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_isr_cause @@
   drivers/scsi/mvumi.c:1945:53: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1945:53: sparse:     got void *outb_isr_cause
   drivers/scsi/mvumi.c:1951:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *outb_isr_cause @@
   drivers/scsi/mvumi.c:1951:36: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1951:36: sparse:     got void *outb_isr_cause
   drivers/scsi/mvumi.c:1953:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *outb_isr_cause @@
   drivers/scsi/mvumi.c:1953:61: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1953:61: sparse:     got void *outb_isr_cause
   drivers/scsi/mvumi.c:1956:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1956:43: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1956:43: sparse:     got void *arm_to_pciea_drbl_reg
   drivers/scsi/mvumi.c:1958:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1958:51: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1958:51: sparse:     got void *arm_to_pciea_drbl_reg
   drivers/scsi/mvumi.c:1975:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1975:37: sparse:     expected void const [noderef] __iomem *
   drivers/scsi/mvumi.c:1975:37: sparse:     got void *arm_to_pciea_drbl_reg
   drivers/scsi/mvumi.c:1977:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void *arm_to_pciea_drbl_reg @@
   drivers/scsi/mvumi.c:1977:45: sparse:     expected void [noderef] __iomem *
   drivers/scsi/mvumi.c:1977:45: sparse:     got void *arm_to_pciea_drbl_reg

vim +1075 drivers/pci/switch/switchtec.c

52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1058  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1059  static int ioctl_pff_to_port(struct switchtec_dev *stdev,
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1060  			     struct switchtec_ioctl_pff_port *up)
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1061  {
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1062  	int i, part;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1063  	u32 reg;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1064  	struct part_cfg_regs *pcfg;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1065  	struct switchtec_ioctl_pff_port p;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1066  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1067  	if (copy_from_user(&p, up, sizeof(p)))
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1068  		return -EFAULT;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1069  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1070  	p.port = -1;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1071  	for (part = 0; part < stdev->partition_count; part++) {
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1072  		pcfg = &stdev->mmio_part_cfg_all[part];
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1073  		p.partition = part;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1074  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02 @1075  		reg = ioread32(&pcfg->usp_pff_inst_id);
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1076  		if (reg == p.pff) {
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1077  			p.port = 0;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1078  			break;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1079  		}
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1080  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1081  		reg = ioread32(&pcfg->vep_pff_inst_id);
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1082  		if (reg == p.pff) {
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1083  			p.port = SWITCHTEC_IOCTL_PFF_VEP;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1084  			break;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1085  		}
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1086  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1087  		for (i = 0; i < ARRAY_SIZE(pcfg->dsp_pff_inst_id); i++) {
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1088  			reg = ioread32(&pcfg->dsp_pff_inst_id[i]);
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1089  			if (reg != p.pff)
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1090  				continue;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1091  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1092  			p.port = i + 1;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1093  			break;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1094  		}
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1095  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1096  		if (p.port != -1)
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1097  			break;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1098  	}
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1099  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1100  	if (copy_to_user(up, &p, sizeof(p)))
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1101  		return -EFAULT;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1102  
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1103  	return 0;
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1104  }
52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1105  

:::::: The code at line 1075 was first introduced by commit
:::::: 52eabba5bcdb2853dec6ef007ba427b092034738 switchtec: Add IOCTLs to the Switchtec driver

:::::: TO: Logan Gunthorpe <logang@deltatee.com>
:::::: CC: Bjorn Helgaas <bhelgaas@google.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37645 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2020-07-08  2:52 [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
@ 2020-07-08  7:13 ` Arnd Bergmann
  2020-07-08  7:26   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-07-08  7:13 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6906 bytes --]

On Wed, Jul 8, 2020 at 4:52 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://github.com/krzk/linux for-next/ioread-const-only-important-patches-v3
> head:   642cfec5a0b4b2c092cc803b8b2100c2bbc3b80b
> commit: 7e593a34879e675b9e9dd7903888b31e0847c12e [1/4] iomap: Constify ioreadX() iomem argument (as in generic implementation)
> config: x86_64-randconfig-s022-20200707 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
> reproduce:
>         # apt-get install sparse
>         # sparse version: v0.6.2-31-gabbfd661-dirty
>         git checkout 7e593a34879e675b9e9dd7903888b31e0847c12e
>         # save the attached .config to linux build tree
>         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>
> 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/pci/switch/switchtec.c:943:31: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
>    drivers/pci/switch/switchtec.c:943:31: sparse:     expected unsigned int [noderef] [usertype] __iomem *
>    drivers/pci/switch/switchtec.c:943:31: sparse:     got void *
>    drivers/pci/switch/switchtec.c:951:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
>    drivers/pci/switch/switchtec.c:951:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
>    drivers/pci/switch/switchtec.c:951:39: sparse:     got void *
>    drivers/pci/switch/switchtec.c:954:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
>    drivers/pci/switch/switchtec.c:954:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
>    drivers/pci/switch/switchtec.c:954:39: sparse:     got void *
>    drivers/pci/switch/switchtec.c:1067:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct switchtec_ioctl_pff_port *up @@
>    drivers/pci/switch/switchtec.c:1067:32: sparse:     expected void const [noderef] __user *from
>    drivers/pci/switch/switchtec.c:1067:32: sparse:     got struct switchtec_ioctl_pff_port *up
>    drivers/pci/switch/switchtec.c:1072:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem * @@
>    drivers/pci/switch/switchtec.c:1072:22: sparse:     expected struct part_cfg_regs *pcfg
>    drivers/pci/switch/switchtec.c:1072:22: sparse:     got struct part_cfg_regs [noderef] __iomem *
> >> drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
> >> drivers/pci/switch/switchtec.c:1075:33: sparse:     expected void const [noderef] __iomem *
>    drivers/pci/switch/switchtec.c:1075:33: sparse:     got unsigned int *

> vim +1075 drivers/pci/switch/switchtec.c
>
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1058
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1059  static int ioctl_pff_to_port(struct switchtec_dev *stdev,
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1060                              struct switchtec_ioctl_pff_port *up)
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1061  {
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1062         int i, part;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1063         u32 reg;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1064         struct part_cfg_regs *pcfg;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1065         struct switchtec_ioctl_pff_port p;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1066
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1067         if (copy_from_user(&p, up, sizeof(p)))
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1068                 return -EFAULT;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1069
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1070         p.port = -1;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1071         for (part = 0; part < stdev->partition_count; part++) {
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1072                 pcfg = &stdev->mmio_part_cfg_all[part];
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1073                 p.partition = part;
> 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1074

> :::::: The code at line 1075 was first introduced by commit
> :::::: 52eabba5bcdb2853dec6ef007ba427b092034738 switchtec: Add IOCTLs to the Switchtec driver
>
> :::::: TO: Logan Gunthorpe <logang@deltatee.com>
> :::::: CC: Bjorn Helgaas <bhelgaas@google.com>

Right, this one needs an __iomem annotation on the 'pcfg' pointer.

>    drivers/scsi/mvumi.c:81:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
>    drivers/scsi/mvumi.c:81:52: sparse:     expected void [noderef] __iomem *
>    drivers/scsi/mvumi.c:81:52: sparse:     got void *
>    drivers/scsi/mvumi.c:90:39: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void * @@     got void [noderef] __iomem * @@
>    drivers/scsi/mvumi.c:90:39: sparse:     expected void *
>    drivers/scsi/mvumi.c:90:39: sparse:     got void [noderef] __iomem *
>    drivers/scsi/mvumi.c:210:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_l @@     got restricted __le32 [usertype] @@
>    drivers/scsi/mvumi.c:210:34: sparse:     expected unsigned int [usertype] baseaddr_l
>    drivers/scsi/mvumi.c:210:34: sparse:     got restricted __le32 [usertype]
>    drivers/scsi/mvumi.c:211:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] baseaddr_h @@     got restricted __le32 [usertype] @@
>    drivers/scsi/mvumi.c:211:34: sparse:     expected unsigned int [usertype] baseaddr_h
>    drivers/scsi/mvumi.c:211:34: sparse:     got restricted __le32 [usertype]
>    drivers/scsi/mvumi.c:213:17: sparse: sparse: invalid assignment: |=
>    drivers/scsi/mvumi.c:213:17: sparse:    left side has type unsigned int
>    drivers/scsi/mvumi.c:213:17: sparse:    right side has type restricted __le32
>    drivers/scsi/mvumi.c:213:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int

Same here, the driver is completely lacking any __iomem annotations.
It has only seen cosmetic updates since it was introduced in 2012.

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2020-07-08  7:13 ` Arnd Bergmann
@ 2020-07-08  7:26   ` Krzysztof Kozlowski
  2020-07-08  7:31     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-08  7:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5558 bytes --]

On Wed, Jul 08, 2020 at 09:13:27AM +0200, Arnd Bergmann wrote:
> On Wed, Jul 8, 2020 at 4:52 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://github.com/krzk/linux for-next/ioread-const-only-important-patches-v3
> > head:   642cfec5a0b4b2c092cc803b8b2100c2bbc3b80b
> > commit: 7e593a34879e675b9e9dd7903888b31e0847c12e [1/4] iomap: Constify ioreadX() iomem argument (as in generic implementation)
> > config: x86_64-randconfig-s022-20200707 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.2-31-gabbfd661-dirty
> >         git checkout 7e593a34879e675b9e9dd7903888b31e0847c12e
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
> >
> > 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/pci/switch/switchtec.c:943:31: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> >    drivers/pci/switch/switchtec.c:943:31: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> >    drivers/pci/switch/switchtec.c:943:31: sparse:     got void *
> >    drivers/pci/switch/switchtec.c:951:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> >    drivers/pci/switch/switchtec.c:951:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> >    drivers/pci/switch/switchtec.c:951:39: sparse:     got void *
> >    drivers/pci/switch/switchtec.c:954:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> >    drivers/pci/switch/switchtec.c:954:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> >    drivers/pci/switch/switchtec.c:954:39: sparse:     got void *
> >    drivers/pci/switch/switchtec.c:1067:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct switchtec_ioctl_pff_port *up @@
> >    drivers/pci/switch/switchtec.c:1067:32: sparse:     expected void const [noderef] __user *from
> >    drivers/pci/switch/switchtec.c:1067:32: sparse:     got struct switchtec_ioctl_pff_port *up
> >    drivers/pci/switch/switchtec.c:1072:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem * @@
> >    drivers/pci/switch/switchtec.c:1072:22: sparse:     expected struct part_cfg_regs *pcfg
> >    drivers/pci/switch/switchtec.c:1072:22: sparse:     got struct part_cfg_regs [noderef] __iomem *
> > >> drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
> > >> drivers/pci/switch/switchtec.c:1075:33: sparse:     expected void const [noderef] __iomem *
> >    drivers/pci/switch/switchtec.c:1075:33: sparse:     got unsigned int *
> 
> > vim +1075 drivers/pci/switch/switchtec.c
> >
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1058
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1059  static int ioctl_pff_to_port(struct switchtec_dev *stdev,
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1060                              struct switchtec_ioctl_pff_port *up)
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1061  {
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1062         int i, part;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1063         u32 reg;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1064         struct part_cfg_regs *pcfg;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1065         struct switchtec_ioctl_pff_port p;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1066
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1067         if (copy_from_user(&p, up, sizeof(p)))
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1068                 return -EFAULT;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1069
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1070         p.port = -1;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1071         for (part = 0; part < stdev->partition_count; part++) {
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1072                 pcfg = &stdev->mmio_part_cfg_all[part];
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1073                 p.partition = part;
> > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1074
> 
> > :::::: The code at line 1075 was first introduced by commit
> > :::::: 52eabba5bcdb2853dec6ef007ba427b092034738 switchtec: Add IOCTLs to the Switchtec driver
> >
> > :::::: TO: Logan Gunthorpe <logang@deltatee.com>
> > :::::: CC: Bjorn Helgaas <bhelgaas@google.com>
> 
> Right, this one needs an __iomem annotation on the 'pcfg' pointer.

I wonder why Kernel Test Robot notifies about this code for this branch.
This is a branch with only ioread-const unification. Although commits
touched included header linux/io-64-nonatomic-lo-hi.h but only constness
was affected.  Therefore all these warnings should exist before as well.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2020-07-08  7:26   ` Krzysztof Kozlowski
@ 2020-07-08  7:31     ` Krzysztof Kozlowski
  2020-07-08  9:01       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-08  7:31 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5853 bytes --]

On Wed, 8 Jul 2020 at 09:26, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, Jul 08, 2020 at 09:13:27AM +0200, Arnd Bergmann wrote:
> > On Wed, Jul 8, 2020 at 4:52 AM kernel test robot <lkp@intel.com> wrote:
> > >
> > > tree:   https://github.com/krzk/linux for-next/ioread-const-only-important-patches-v3
> > > head:   642cfec5a0b4b2c092cc803b8b2100c2bbc3b80b
> > > commit: 7e593a34879e675b9e9dd7903888b31e0847c12e [1/4] iomap: Constify ioreadX() iomem argument (as in generic implementation)
> > > config: x86_64-randconfig-s022-20200707 (attached as .config)
> > > compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
> > > reproduce:
> > >         # apt-get install sparse
> > >         # sparse version: v0.6.2-31-gabbfd661-dirty
> > >         git checkout 7e593a34879e675b9e9dd7903888b31e0847c12e
> > >         # save the attached .config to linux build tree
> > >         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
> > >
> > > 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/pci/switch/switchtec.c:943:31: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> > >    drivers/pci/switch/switchtec.c:943:31: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> > >    drivers/pci/switch/switchtec.c:943:31: sparse:     got void *
> > >    drivers/pci/switch/switchtec.c:951:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> > >    drivers/pci/switch/switchtec.c:951:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> > >    drivers/pci/switch/switchtec.c:951:39: sparse:     got void *
> > >    drivers/pci/switch/switchtec.c:954:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected unsigned int [noderef] [usertype] __iomem * @@     got void * @@
> > >    drivers/pci/switch/switchtec.c:954:39: sparse:     expected unsigned int [noderef] [usertype] __iomem *
> > >    drivers/pci/switch/switchtec.c:954:39: sparse:     got void *
> > >    drivers/pci/switch/switchtec.c:1067:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct switchtec_ioctl_pff_port *up @@
> > >    drivers/pci/switch/switchtec.c:1067:32: sparse:     expected void const [noderef] __user *from
> > >    drivers/pci/switch/switchtec.c:1067:32: sparse:     got struct switchtec_ioctl_pff_port *up
> > >    drivers/pci/switch/switchtec.c:1072:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct part_cfg_regs *pcfg @@     got struct part_cfg_regs [noderef] __iomem * @@
> > >    drivers/pci/switch/switchtec.c:1072:22: sparse:     expected struct part_cfg_regs *pcfg
> > >    drivers/pci/switch/switchtec.c:1072:22: sparse:     got struct part_cfg_regs [noderef] __iomem *
> > > >> drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned int * @@
> > > >> drivers/pci/switch/switchtec.c:1075:33: sparse:     expected void const [noderef] __iomem *
> > >    drivers/pci/switch/switchtec.c:1075:33: sparse:     got unsigned int *
> >
> > > vim +1075 drivers/pci/switch/switchtec.c
> > >
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1058
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1059  static int ioctl_pff_to_port(struct switchtec_dev *stdev,
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1060                              struct switchtec_ioctl_pff_port *up)
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1061  {
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1062         int i, part;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1063         u32 reg;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1064         struct part_cfg_regs *pcfg;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1065         struct switchtec_ioctl_pff_port p;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1066
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1067         if (copy_from_user(&p, up, sizeof(p)))
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1068                 return -EFAULT;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1069
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1070         p.port = -1;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1071         for (part = 0; part < stdev->partition_count; part++) {
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1072                 pcfg = &stdev->mmio_part_cfg_all[part];
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1073                 p.partition = part;
> > > 52eabba5bcdb28 Logan Gunthorpe 2017-03-02  1074
> >
> > > :::::: The code at line 1075 was first introduced by commit
> > > :::::: 52eabba5bcdb2853dec6ef007ba427b092034738 switchtec: Add IOCTLs to the Switchtec driver
> > >
> > > :::::: TO: Logan Gunthorpe <logang@deltatee.com>
> > > :::::: CC: Bjorn Helgaas <bhelgaas@google.com>
> >
> > Right, this one needs an __iomem annotation on the 'pcfg' pointer.
>
> I wonder why Kernel Test Robot notifies about this code for this branch.
> This is a branch with only ioread-const unification. Although commits
> touched included header linux/io-64-nonatomic-lo-hi.h but only constness
> was affected.  Therefore all these warnings should exist before as well.

I just double checked - the warnings were there already, before my patches.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2020-07-08  7:31     ` Krzysztof Kozlowski
@ 2020-07-08  9:01       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2020-07-08  9:01 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

On Wed, Jul 8, 2020 at 9:31 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Wed, 8 Jul 2020 at 09:26, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > > Right, this one needs an __iomem annotation on the 'pcfg' pointer.
> >
> > I wonder why Kernel Test Robot notifies about this code for this branch.
> > This is a branch with only ioread-const unification. Although commits
> > touched included header linux/io-64-nonatomic-lo-hi.h but only constness
> > was affected.  Therefore all these warnings should exist before as well.
>
> I just double checked - the warnings were there already, before my patches.

I think the email gets sent because the warning text changed from before, now
it expects a 'const __iomem void*' argument rather than an '__iomem void *',
and the script is not smart enough to tell that this is the same bug as before.

       Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-08  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08  2:52 [krzk-github:for-next/ioread-const-only-important-patches-v3 1/4] drivers/pci/switch/switchtec.c:1075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2020-07-08  7:13 ` Arnd Bergmann
2020-07-08  7:26   ` Krzysztof Kozlowski
2020-07-08  7:31     ` Krzysztof Kozlowski
2020-07-08  9:01       ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.