[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202005280310.1f0MywbB%lkp@intel.com>
Date: Thu, 28 May 2020 03:38:14 +0800
From: kbuild test robot <lkp@...el.com>
To: Colin Ian King <colin.king@...onical.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Chen <peter.chen@....com>
Subject: drivers/usb/cdns3/drd.c:43:42: sparse: sparse: incorrect type in
argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 444fc5cde64330661bf59944c43844e7d4c2ccd8
commit: 70d8b9e5e63d212019ba3f6823c8ec3d2df87645 usb: cdns3: make signed 1 bit bitfields unsigned
date: 9 weeks ago
config: mips-randconfig-s032-20200527 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
git checkout 70d8b9e5e63d212019ba3f6823c8ec3d2df87645
# save the attached .config to linux build tree
make W=1 C=1 ARCH=mips CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/cdns3/drd.c:43:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:43:42: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:43:42: sparse: got restricted __le32 *
>> drivers/usb/cdns3/drd.c:45:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:45:42: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:45:42: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:47:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:47:42: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:47:42: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:49:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:49:42: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:49:42: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:71:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:71:25: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:71:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:81:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:81:30: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:81:30: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:114:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:114:24: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:114:24: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:124:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:124:48: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:124:48: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:141:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:141:56: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:141:56: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:144:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:144:23: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:144:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:144:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:144:23: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:144:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:154:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:154:29: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:154:29: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:156:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:156:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:156:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:156:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:156:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:156:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:178:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:178:55: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:178:55: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:182:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:182:23: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:182:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:182:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:182:23: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:182:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:197:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:197:29: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:197:29: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:199:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:199:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:199:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:199:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:199:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:199:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:219:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:219:25: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:219:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:284:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:284:26: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:284:26: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:303:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:303:25: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:303:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:326:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cdns3_otg_legacy_regs *otg_v0_regs @@ got void [noderef] <asn:2> *[assigned] regs @@
drivers/usb/cdns3/drd.c:326:27: sparse: expected struct cdns3_otg_legacy_regs *otg_v0_regs
drivers/usb/cdns3/drd.c:326:27: sparse: got void [noderef] <asn:2> *[assigned] regs
drivers/usb/cdns3/drd.c:327:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:327:25: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:327:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:330:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cdns3_otg_common_regs *otg_regs @@ got void [noderef] <asn:2> *[assigned] regs @@
drivers/usb/cdns3/drd.c:330:32: sparse: expected struct cdns3_otg_common_regs *otg_regs
drivers/usb/cdns3/drd.c:330:32: sparse: got void [noderef] <asn:2> *[assigned] regs
drivers/usb/cdns3/drd.c:331:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:331:32: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:331:32: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:332:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:332:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:332:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:336:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cdns3_otg_regs *otg_v1_regs @@ got void [noderef] <asn:2> *[assigned] regs @@
drivers/usb/cdns3/drd.c:336:35: sparse: expected struct cdns3_otg_regs *otg_v1_regs
drivers/usb/cdns3/drd.c:336:35: sparse: got void [noderef] <asn:2> *[assigned] regs
drivers/usb/cdns3/drd.c:339:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:339:32: sparse: expected void volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:339:32: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:340:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:340:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:340:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:340:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:340:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:340:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:345:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:345:17: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:345:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:368:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *mem @@ got restricted __le32 * @@
drivers/usb/cdns3/drd.c:368:28: sparse: expected void const volatile [noderef] <asn:2> *mem
drivers/usb/cdns3/drd.c:368:28: sparse: got restricted __le32 *
arch/mips/include/asm/io.h:429:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:429:1: sparse: sparse: cast to restricted __le32
vim +43 drivers/usb/cdns3/drd.c
7733f6c32e36ff Pawel Laszczak 2019-08-26 22
7733f6c32e36ff Pawel Laszczak 2019-08-26 23 /**
7733f6c32e36ff Pawel Laszczak 2019-08-26 24 * cdns3_set_mode - change mode of OTG Core
7733f6c32e36ff Pawel Laszczak 2019-08-26 25 * @cdns: pointer to context structure
7733f6c32e36ff Pawel Laszczak 2019-08-26 26 * @mode: selected mode from cdns_role
7733f6c32e36ff Pawel Laszczak 2019-08-26 27 *
7733f6c32e36ff Pawel Laszczak 2019-08-26 28 * Returns 0 on success otherwise negative errno
7733f6c32e36ff Pawel Laszczak 2019-08-26 29 */
7733f6c32e36ff Pawel Laszczak 2019-08-26 30 int cdns3_set_mode(struct cdns3 *cdns, enum usb_dr_mode mode)
7733f6c32e36ff Pawel Laszczak 2019-08-26 31 {
7733f6c32e36ff Pawel Laszczak 2019-08-26 32 int ret = 0;
7733f6c32e36ff Pawel Laszczak 2019-08-26 33 u32 reg;
7733f6c32e36ff Pawel Laszczak 2019-08-26 34
7733f6c32e36ff Pawel Laszczak 2019-08-26 35 switch (mode) {
7733f6c32e36ff Pawel Laszczak 2019-08-26 36 case USB_DR_MODE_PERIPHERAL:
7733f6c32e36ff Pawel Laszczak 2019-08-26 37 break;
7733f6c32e36ff Pawel Laszczak 2019-08-26 38 case USB_DR_MODE_HOST:
7733f6c32e36ff Pawel Laszczak 2019-08-26 39 break;
7733f6c32e36ff Pawel Laszczak 2019-08-26 40 case USB_DR_MODE_OTG:
7733f6c32e36ff Pawel Laszczak 2019-08-26 41 dev_dbg(cdns->dev, "Set controller to OTG mode\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26 42 if (cdns->version == CDNS3_CONTROLLER_V1) {
7733f6c32e36ff Pawel Laszczak 2019-08-26 @43 reg = readl(&cdns->otg_v1_regs->override);
7733f6c32e36ff Pawel Laszczak 2019-08-26 44 reg |= OVERRIDE_IDPULLUP;
7733f6c32e36ff Pawel Laszczak 2019-08-26 @45 writel(reg, &cdns->otg_v1_regs->override);
7733f6c32e36ff Pawel Laszczak 2019-08-26 46 } else {
7733f6c32e36ff Pawel Laszczak 2019-08-26 47 reg = readl(&cdns->otg_v0_regs->ctrl1);
7733f6c32e36ff Pawel Laszczak 2019-08-26 48 reg |= OVERRIDE_IDPULLUP_V0;
7733f6c32e36ff Pawel Laszczak 2019-08-26 49 writel(reg, &cdns->otg_v0_regs->ctrl1);
7733f6c32e36ff Pawel Laszczak 2019-08-26 50 }
7733f6c32e36ff Pawel Laszczak 2019-08-26 51
7733f6c32e36ff Pawel Laszczak 2019-08-26 52 /*
7733f6c32e36ff Pawel Laszczak 2019-08-26 53 * Hardware specification says: "ID_VALUE must be valid within
7733f6c32e36ff Pawel Laszczak 2019-08-26 54 * 50ms after idpullup is set to '1" so driver must wait
7733f6c32e36ff Pawel Laszczak 2019-08-26 55 * 50ms before reading this pin.
7733f6c32e36ff Pawel Laszczak 2019-08-26 56 */
7733f6c32e36ff Pawel Laszczak 2019-08-26 57 usleep_range(50000, 60000);
7733f6c32e36ff Pawel Laszczak 2019-08-26 58 break;
7733f6c32e36ff Pawel Laszczak 2019-08-26 59 default:
7733f6c32e36ff Pawel Laszczak 2019-08-26 60 dev_err(cdns->dev, "Unsupported mode of operation %d\n", mode);
7733f6c32e36ff Pawel Laszczak 2019-08-26 61 return -EINVAL;
7733f6c32e36ff Pawel Laszczak 2019-08-26 62 }
7733f6c32e36ff Pawel Laszczak 2019-08-26 63
7733f6c32e36ff Pawel Laszczak 2019-08-26 64 return ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26 65 }
7733f6c32e36ff Pawel Laszczak 2019-08-26 66
:::::: The code at line 43 was first introduced by commit
:::::: 7733f6c32e36ff9d7adadf40001039bf219b1cbe usb: cdns3: Add Cadence USB3 DRD Driver
:::::: TO: Pawel Laszczak <pawell@...ence.com>
:::::: CC: Felipe Balbi <felipe.balbi@...ux.intel.com>
---
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" (36674 bytes)
Powered by blists - more mailing lists