[usb:usb-testing 64/146] drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   29b01295a829fba7399ee84afff4e64660e49f04
commit: fc53d5279094e38e6363506339772a7021da2df8 [64/146] usb: chipidea: tegra: Support host mode
config: arm-randconfig-s031-20210201 (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-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=fc53d5279094e38e6363506339772a7021da2df8
        git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
        git fetch --no-tags usb usb-testing
        git checkout fc53d5279094e38e6363506339772a7021da2df8
        # 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@xxxxxxxxx>


"sparse warnings: (new ones prefixed by >>)"
   drivers/usb/chipidea/ci_hdrc_tegra.c: note: in included file:
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:743:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:743:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:743:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:743:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:743:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
>> drivers/usb/chipidea/../host/ehci.h:767:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned int * @@
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/chipidea/../host/ehci.h:767:17: sparse:     got unsigned int *
   drivers/usb/chipidea/../host/ehci.h:766:36: sparse: sparse: context imbalance in 'tegra_usb_internal_port_reset' - unexpected unlock

vim +767 drivers/usb/chipidea/../host/ehci.h

91bc4d31e81b15 Vladimir Barinov       2007-12-30  737  
083522d76662cd Benjamin Herrenschmidt 2006-12-15  738  static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
083522d76662cd Benjamin Herrenschmidt 2006-12-15  739  		__u32 __iomem *regs)
083522d76662cd Benjamin Herrenschmidt 2006-12-15  740  {
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  741  #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
083522d76662cd Benjamin Herrenschmidt 2006-12-15  742  	return ehci_big_endian_mmio(ehci) ?
68f50e52554a0a Al Viro                2007-02-09 @743  		readl_be(regs) :
68f50e52554a0a Al Viro                2007-02-09  744  		readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  745  #else
68f50e52554a0a Al Viro                2007-02-09  746  	return readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  747  #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15  748  }
083522d76662cd Benjamin Herrenschmidt 2006-12-15  749  
feffe09f510c47 Peter Chen             2014-01-10  750  #ifdef CONFIG_SOC_IMX28
feffe09f510c47 Peter Chen             2014-01-10  751  static inline void imx28_ehci_writel(const unsigned int val,
feffe09f510c47 Peter Chen             2014-01-10  752  		volatile __u32 __iomem *addr)
feffe09f510c47 Peter Chen             2014-01-10  753  {
feffe09f510c47 Peter Chen             2014-01-10  754  	__asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
feffe09f510c47 Peter Chen             2014-01-10  755  }
feffe09f510c47 Peter Chen             2014-01-10  756  #else
feffe09f510c47 Peter Chen             2014-01-10  757  static inline void imx28_ehci_writel(const unsigned int val,
feffe09f510c47 Peter Chen             2014-01-10  758  		volatile __u32 __iomem *addr)
feffe09f510c47 Peter Chen             2014-01-10  759  {
feffe09f510c47 Peter Chen             2014-01-10  760  }
feffe09f510c47 Peter Chen             2014-01-10  761  #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15  762  static inline void ehci_writel(const struct ehci_hcd *ehci,
083522d76662cd Benjamin Herrenschmidt 2006-12-15  763  		const unsigned int val, __u32 __iomem *regs)
083522d76662cd Benjamin Herrenschmidt 2006-12-15  764  {
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  765  #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
083522d76662cd Benjamin Herrenschmidt 2006-12-15  766  	ehci_big_endian_mmio(ehci) ?
68f50e52554a0a Al Viro                2007-02-09 @767  		writel_be(val, regs) :
68f50e52554a0a Al Viro                2007-02-09  768  		writel(val, regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  769  #else
feffe09f510c47 Peter Chen             2014-01-10  770  	if (ehci->imx28_write_fix)
feffe09f510c47 Peter Chen             2014-01-10  771  		imx28_ehci_writel(val, regs);
feffe09f510c47 Peter Chen             2014-01-10  772  	else
68f50e52554a0a Al Viro                2007-02-09  773  		writel(val, regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28  774  #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15  775  }
8cd42e97bf451b Kumar Gala             2006-01-20  776  

:::::: The code at line 767 was first introduced by commit
:::::: 68f50e52554a0a55dfe2e3fdf659ee0569d73c3f [PATCH] hci_{read,write}l() does force casts to wrong type for no reason

:::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxxxxxxxx>

---
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