[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202005261232.l7VmPPed%lkp@intel.com>
Date: Tue, 26 May 2020 12:32:36 +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:31: sparse: expected void const
volatile [noderef] <asn:2> *
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9cb1fd0efd195590b828b9b865421ad345a4a145
commit: 70d8b9e5e63d212019ba3f6823c8ec3d2df87645 usb: cdns3: make signed 1 bit bitfields unsigned
date: 9 weeks ago
config: sh-randconfig-s032-20200526 (attached as .config)
compiler: sh4-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=sh 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 >>)
./arch/sh/include/generated/uapi/asm/unistd_32.h:411:37: sparse: sparse: no newline at end of file
drivers/usb/cdns3/drd.c:43:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
>> drivers/usb/cdns3/drd.c:43:31: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:43:31: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:45:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:45:25: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:45:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:47:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:47:31: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:47:31: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:49:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:49:25: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:49:25: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:71:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:71:14: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:71:14: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:81:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:81:19: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:81:19: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:114:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:114:9: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:114:9: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:123:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:123:9: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:123:9: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:141:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:141:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:141:17: 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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:144:23: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:144:23: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:144:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:152:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:152:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:152: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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:156:17: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:156:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:156:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:178:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:178:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:178:17: 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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:182:23: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:182:23: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:182:23: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:195:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:195:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:195: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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:199:17: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:199:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:199:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:219:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:219:9: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:219:9: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:284:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:284:15: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:284:15: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:303:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:303:9: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:303:9: 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 struct cdns3_otg_legacy_regs *otg_v0_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:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:327:14: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:327:14: 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 struct cdns3_otg_common_regs *otg_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:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:331:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:331:17: 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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:332:17: sparse: expected void const volatile [noderef] <asn:2> *
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 [noderestruct cdns3_otg_regs *otg_v1_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:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:339:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:339: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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:340:17: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:340:17: sparse: expected void const volatile [noderef] <asn:2> *
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> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:345:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:345:17: sparse: got restricted __le32 *
drivers/usb/cdns3/drd.c:368:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got [noderef] <asn:2> * @@
drivers/usb/cdns3/drd.c:368:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/usb/cdns3/drd.c:368:17: sparse: got 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" (24361 bytes)
Powered by blists - more mailing lists