[xlnx:xlnx_rebase_v5.4 1296/1698] drivers/usb/dwc3/dwc3-of-simple.c:231:40: sparse: sparse: incorrect type in assignment (different address spaces)
kernel test robot
lkp at intel.com
Thu Jan 21 11:39:42 EST 2021
Hi Vishal,
First bad commit (maybe != root cause):
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 6ccc4c949a216b74368d280af00ac0cecf6fea07
commit: 0b197959bbbdb68e1da974bd013339f08704b178 [1296/1698] staging: xlnxsync: Fix the uapi header license
config: arm-randconfig-s032-20210121 (attached as .config)
compiler: arm-linux-gnueabi-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-208-g46a52ca4-dirty
# https://github.com/Xilinx/linux-xlnx/commit/0b197959bbbdb68e1da974bd013339f08704b178
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 0b197959bbbdb68e1da974bd013339f08704b178
# 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=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/dwc3/dwc3-of-simple.c:231:40: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *platform_data @@ got void [noderef] <asn:2> *regs @@
drivers/usb/dwc3/dwc3-of-simple.c:231:40: sparse: expected void *platform_data
drivers/usb/dwc3/dwc3-of-simple.c:231:40: sparse: got void [noderef] <asn:2> *regs
vim +231 drivers/usb/dwc3/dwc3-of-simple.c
6d0468b837bc2b3c Michal Simek 2020-03-16 211
783997b6a777efb7 Piyush Mehta 2020-01-23 212 static int dwc3_simple_set_phydata(struct dwc3_of_simple *simple)
783997b6a777efb7 Piyush Mehta 2020-01-23 213 {
783997b6a777efb7 Piyush Mehta 2020-01-23 214 struct device *dev = simple->dev;
783997b6a777efb7 Piyush Mehta 2020-01-23 215 struct device_node *np = dev->of_node;
783997b6a777efb7 Piyush Mehta 2020-01-23 216 struct phy *phy;
783997b6a777efb7 Piyush Mehta 2020-01-23 217
783997b6a777efb7 Piyush Mehta 2020-01-23 218 np = of_get_next_child(np, NULL);
783997b6a777efb7 Piyush Mehta 2020-01-23 219
783997b6a777efb7 Piyush Mehta 2020-01-23 220 if (np) {
783997b6a777efb7 Piyush Mehta 2020-01-23 221 phy = of_phy_get(np, "usb3-phy");
783997b6a777efb7 Piyush Mehta 2020-01-23 222 if (IS_ERR(phy)) {
783997b6a777efb7 Piyush Mehta 2020-01-23 223 dev_err(dev, "%s: Can't find usb3-phy\n", __func__);
783997b6a777efb7 Piyush Mehta 2020-01-23 224 return PTR_ERR(phy);
783997b6a777efb7 Piyush Mehta 2020-01-23 225 }
783997b6a777efb7 Piyush Mehta 2020-01-23 226
783997b6a777efb7 Piyush Mehta 2020-01-23 227 /* Store phy for future usage */
783997b6a777efb7 Piyush Mehta 2020-01-23 228 simple->phy = phy;
783997b6a777efb7 Piyush Mehta 2020-01-23 229
783997b6a777efb7 Piyush Mehta 2020-01-23 230 /* assign USB vendor regs addr to phy platform_data */
783997b6a777efb7 Piyush Mehta 2020-01-23 @231 phy->dev.platform_data = simple->regs;
783997b6a777efb7 Piyush Mehta 2020-01-23 232
783997b6a777efb7 Piyush Mehta 2020-01-23 233 phy_put(phy);
783997b6a777efb7 Piyush Mehta 2020-01-23 234 } else {
783997b6a777efb7 Piyush Mehta 2020-01-23 235 dev_err(dev, "%s: Can't find child node\n", __func__);
783997b6a777efb7 Piyush Mehta 2020-01-23 236 return -EINVAL;
783997b6a777efb7 Piyush Mehta 2020-01-23 237 }
783997b6a777efb7 Piyush Mehta 2020-01-23 238
783997b6a777efb7 Piyush Mehta 2020-01-23 239 return 0;
783997b6a777efb7 Piyush Mehta 2020-01-23 240 }
783997b6a777efb7 Piyush Mehta 2020-01-23 241
:::::: The code at line 231 was first introduced by commit
:::::: 783997b6a777efb7efa5fa47602d04a7ddcbee87 dwc3: Add support for setting USB control registers as phy platform data
:::::: TO: Piyush Mehta <piyush.mehta at xilinx.com>
:::::: CC: Michal Simek <michal.simek at xilinx.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 23414 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210122/3e7b372e/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list