[peter.chen-usb:for-usb-next 17/30] drivers/usb/cdns3/drd.c:44:38: sparse: sparse: incorrect type in assignment (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git for-usb-next
head:   94e0623337a6d52721e3a842cbfe7196e9f34144
commit: 21f969177b7ea36687b93c8e17b75cfc906c1e68 [17/30] usb: cdns3: Add support for DRD CDNSP
config: parisc-randconfig-s031-20201209 (attached as .config)
compiler: hppa-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.3-179-ga00755aa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/commit/?id=21f969177b7ea36687b93c8e17b75cfc906c1e68
        git remote add peter.chen-usb https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
        git fetch --no-tags peter.chen-usb for-usb-next
        git checkout 21f969177b7ea36687b93c8e17b75cfc906c1e68
        # 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=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/cdns3/drd.c:44:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:44:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:44:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:46:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:46:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:46:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:48:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:48:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:48:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:67:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:67:50: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:67:50: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:69:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:69:50: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:69:50: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:92:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:92:25: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:92:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:102:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:102:30: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:102:30: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:135:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:135:24: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:135:24: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:145:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:145:48: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:145:48: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:161:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:161:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:161:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:169:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:169:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:169:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:169:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:169:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:169:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:189:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:189:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:189:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:192:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:192:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:192:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:192:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:192:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:192:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:211:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:211:47: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:211:47: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:220:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:220:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:220:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:220:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:220:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:220:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:246:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:246:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:246:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:248:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:248:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:248:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:248:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:248:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:248:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:266:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:266:25: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:266:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:335:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:335:26: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:335:26: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:354:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:354:25: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:354:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:377:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns3_otg_legacy_regs *otg_v0_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:377:27: sparse:     expected struct cdns3_otg_legacy_regs *otg_v0_regs
   drivers/usb/cdns3/drd.c:377:27: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:378:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:378:25: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:378:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:382:32: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns3_otg_common_regs *otg_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:382:32: sparse:     expected struct cdns3_otg_common_regs *otg_regs
   drivers/usb/cdns3/drd.c:382:32: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:385:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:385:32: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:385:32: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:386:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:386:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:386:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:390:35: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns3_otg_regs *otg_v1_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:390:35: sparse:     expected struct cdns3_otg_regs *otg_v1_regs
   drivers/usb/cdns3/drd.c:390:35: sparse:     got void [noderef] __iomem *[assigned] regs
>> drivers/usb/cdns3/drd.c:391:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdnsp_otg_regs *otg_cdnsp_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:391:38: sparse:     expected struct cdnsp_otg_regs *otg_cdnsp_regs
   drivers/usb/cdns3/drd.c:391:38: sparse:     got void [noderef] __iomem *[assigned] regs
>> drivers/usb/cdns3/drd.c:395:41: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/drd.c:402:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:402:40: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:402:40: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:406:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:406:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:406:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:406:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:406:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:406:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:411:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:411:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:411:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:440:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:440:28: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:440:28: sparse:     got restricted __le32 *

vim +44 drivers/usb/cdns3/drd.c

    22	
    23	/**
    24	 * cdns3_set_mode - change mode of OTG Core
    25	 * @cdns: pointer to context structure
    26	 * @mode: selected mode from cdns_role
    27	 *
    28	 * Returns 0 on success otherwise negative errno
    29	 */
    30	static int cdns3_set_mode(struct cdns3 *cdns, enum usb_dr_mode mode)
    31	{
    32		u32 __iomem *override_reg;
    33		u32 reg;
    34	
    35		switch (mode) {
    36		case USB_DR_MODE_PERIPHERAL:
    37			break;
    38		case USB_DR_MODE_HOST:
    39			break;
    40		case USB_DR_MODE_OTG:
    41			dev_dbg(cdns->dev, "Set controller to OTG mode\n");
    42	
    43			if (cdns->version == CDNSP_CONTROLLER_V2)
  > 44				override_reg = &cdns->otg_cdnsp_regs->override;
    45			else if (cdns->version == CDNS3_CONTROLLER_V1)
    46				override_reg = &cdns->otg_v1_regs->override;
    47			else
    48				override_reg = &cdns->otg_v0_regs->ctrl1;
    49	
    50			reg = readl(override_reg);
    51	
    52			if (cdns->version != CDNS3_CONTROLLER_V0)
    53				reg |= OVERRIDE_IDPULLUP;
    54			else
    55				reg |= OVERRIDE_IDPULLUP_V0;
    56	
    57			writel(reg, override_reg);
    58	
    59			if (cdns->version == CDNS3_CONTROLLER_V1) {
    60				/*
    61				 * Enable work around feature built into the
    62				 * controller to address issue with RX Sensitivity
    63				 * est (EL_17) for USB2 PHY. The issue only occures
    64				 * for 0x0002450D controller version.
    65				 */
    66				if (cdns->phyrst_a_enable) {
    67					reg = readl(&cdns->otg_v1_regs->phyrst_cfg);
    68					reg |= PHYRST_CFG_PHYRST_A_ENABLE;
    69					writel(reg, &cdns->otg_v1_regs->phyrst_cfg);
    70				}
    71			}
    72	
    73			/*
    74			 * Hardware specification says: "ID_VALUE must be valid within
    75			 * 50ms after idpullup is set to '1" so driver must wait
    76			 * 50ms before reading this pin.
    77			 */
    78			usleep_range(50000, 60000);
    79			break;
    80		default:
    81			dev_err(cdns->dev, "Unsupported mode of operation %d\n", mode);
    82			return -EINVAL;
    83		}
    84	
    85		return 0;
    86	}
    87	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux