[xlnx:xlnx_rebase_v5.4 1296/1704] 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
Wed Apr 7 14:08:18 BST 2021


Hi Vishal,

First bad commit (maybe != root cause):

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   914337937cb6a106a2942347d8c8feacd2223299
commit: 0b197959bbbdb68e1da974bd013339f08704b178 [1296/1704] staging: xlnxsync: Fix the uapi header license
config: x86_64-randconfig-s021-20210407 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-279-g6d5d9b42-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
        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 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

6d0468b837bc2b Michal Simek 2020-03-16  211  
783997b6a777ef Piyush Mehta 2020-01-23  212  static int dwc3_simple_set_phydata(struct dwc3_of_simple *simple)
783997b6a777ef Piyush Mehta 2020-01-23  213  {
783997b6a777ef Piyush Mehta 2020-01-23  214  	struct device		*dev = simple->dev;
783997b6a777ef Piyush Mehta 2020-01-23  215  	struct device_node	*np = dev->of_node;
783997b6a777ef Piyush Mehta 2020-01-23  216  	struct phy		*phy;
783997b6a777ef Piyush Mehta 2020-01-23  217  
783997b6a777ef Piyush Mehta 2020-01-23  218  	np = of_get_next_child(np, NULL);
783997b6a777ef Piyush Mehta 2020-01-23  219  
783997b6a777ef Piyush Mehta 2020-01-23  220  	if (np) {
783997b6a777ef Piyush Mehta 2020-01-23  221  		phy = of_phy_get(np, "usb3-phy");
783997b6a777ef Piyush Mehta 2020-01-23  222  		if (IS_ERR(phy)) {
783997b6a777ef Piyush Mehta 2020-01-23  223  			dev_err(dev, "%s: Can't find usb3-phy\n", __func__);
783997b6a777ef Piyush Mehta 2020-01-23  224  			return PTR_ERR(phy);
783997b6a777ef Piyush Mehta 2020-01-23  225  		}
783997b6a777ef Piyush Mehta 2020-01-23  226  
783997b6a777ef Piyush Mehta 2020-01-23  227  		/* Store phy for future usage */
783997b6a777ef Piyush Mehta 2020-01-23  228  		simple->phy = phy;
783997b6a777ef Piyush Mehta 2020-01-23  229  
783997b6a777ef Piyush Mehta 2020-01-23  230  		/* assign USB vendor regs addr to phy platform_data */
783997b6a777ef Piyush Mehta 2020-01-23 @231  		phy->dev.platform_data = simple->regs;
783997b6a777ef Piyush Mehta 2020-01-23  232  
783997b6a777ef Piyush Mehta 2020-01-23  233  		phy_put(phy);
783997b6a777ef Piyush Mehta 2020-01-23  234  	} else {
783997b6a777ef Piyush Mehta 2020-01-23  235  		dev_err(dev, "%s: Can't find child node\n", __func__);
783997b6a777ef Piyush Mehta 2020-01-23  236  		return -EINVAL;
783997b6a777ef Piyush Mehta 2020-01-23  237  	}
783997b6a777ef Piyush Mehta 2020-01-23  238  
783997b6a777ef Piyush Mehta 2020-01-23  239  	return 0;
783997b6a777ef Piyush Mehta 2020-01-23  240  }
783997b6a777ef 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: 33039 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210407/71058241/attachment-0001.gz>


More information about the linux-arm-kernel mailing list