[linux-next:master 8225/11059] drivers/fpga/dfl.c:1828:16: sparse: sparse: incorrect type in initializer (different address spaces)

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

 



Hi Julian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6145d80cfc62e3ed8f16ff584d6287e6d88b82b9
commit: 969f31e9eae3fb5d8388677c2ec34c2f447f7376 [8225/11059] lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
config: csky-randconfig-s032-20210408 (attached as .config)
compiler: csky-linux-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-279-g6d5d9b42-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=969f31e9eae3fb5d8388677c2ec34c2f447f7376
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 969f31e9eae3fb5d8388677c2ec34c2f447f7376
        # 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=csky 

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/fpga/dfl.c:1828:16: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int *__pu_addr @@     got unsigned int [noderef] [usertype] __user * @@
   drivers/fpga/dfl.c:1828:16: sparse:     expected unsigned int *__pu_addr
   drivers/fpga/dfl.c:1828:16: sparse:     got unsigned int [noderef] [usertype] __user *
   drivers/fpga/dfl.c: note: in included file (through arch/csky/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
--
>> drivers/platform/goldfish/goldfish_pipe.c:406:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got char [noderef] __user *buffer @@
   drivers/platform/goldfish/goldfish_pipe.c:406:13: sparse:     expected void const *addr
   drivers/platform/goldfish/goldfish_pipe.c:406:13: sparse:     got char [noderef] __user *buffer
   drivers/platform/goldfish/goldfish_pipe.c:500:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/platform/goldfish/goldfish_pipe.c:500:24: sparse:     expected restricted __poll_t
   drivers/platform/goldfish/goldfish_pipe.c:500:24: sparse:     got int
   drivers/platform/goldfish/goldfish_pipe.c: note: in included file (through arch/csky/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:299:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:299:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
--
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1824:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got unsigned int const [noderef] __user *__gu_ptr @@
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1824:9: sparse:     expected void const *addr
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1824:9: sparse:     got unsigned int const [noderef] __user *__gu_ptr
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1826:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int *__pu_addr @@     got unsigned int [noderef] [usertype] __user * @@
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1826:9: sparse:     expected unsigned int *__pu_addr
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1826:9: sparse:     got unsigned int [noderef] [usertype] __user *
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1829:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got unsigned int const [noderef] __user *__gu_ptr @@
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1829:9: sparse:     expected void const *addr
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1829:9: sparse:     got unsigned int const [noderef] __user *__gu_ptr
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1841:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got unsigned int const [noderef] __user *__gu_ptr @@
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1841:9: sparse:     expected void const *addr
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1841:9: sparse:     got unsigned int const [noderef] __user *__gu_ptr

vim +1828 drivers/fpga/dfl.c

322b598be4d9b9 Xu Yilun 2020-06-16  1815  
322b598be4d9b9 Xu Yilun 2020-06-16  1816  /**
322b598be4d9b9 Xu Yilun 2020-06-16  1817   * dfl_feature_ioctl_get_num_irqs - dfl feature _GET_IRQ_NUM ioctl interface.
322b598be4d9b9 Xu Yilun 2020-06-16  1818   * @pdev: the feature device which has the sub feature
322b598be4d9b9 Xu Yilun 2020-06-16  1819   * @feature: the dfl sub feature
322b598be4d9b9 Xu Yilun 2020-06-16  1820   * @arg: ioctl argument
322b598be4d9b9 Xu Yilun 2020-06-16  1821   *
322b598be4d9b9 Xu Yilun 2020-06-16  1822   * Return: 0 on success, negative error code otherwise.
322b598be4d9b9 Xu Yilun 2020-06-16  1823   */
322b598be4d9b9 Xu Yilun 2020-06-16  1824  long dfl_feature_ioctl_get_num_irqs(struct platform_device *pdev,
322b598be4d9b9 Xu Yilun 2020-06-16  1825  				    struct dfl_feature *feature,
322b598be4d9b9 Xu Yilun 2020-06-16  1826  				    unsigned long arg)
322b598be4d9b9 Xu Yilun 2020-06-16  1827  {
322b598be4d9b9 Xu Yilun 2020-06-16 @1828  	return put_user(feature->nr_irqs, (__u32 __user *)arg);
322b598be4d9b9 Xu Yilun 2020-06-16  1829  }
322b598be4d9b9 Xu Yilun 2020-06-16  1830  EXPORT_SYMBOL_GPL(dfl_feature_ioctl_get_num_irqs);
322b598be4d9b9 Xu Yilun 2020-06-16  1831  

:::::: The code at line 1828 was first introduced by commit
:::::: 322b598be4d9b9090cda560c4caab78704615ab4 fpga: dfl: introduce interrupt trigger setting API

:::::: TO: Xu Yilun <yilun.xu@xxxxxxxxx>
:::::: CC: Moritz Fischer <mdf@xxxxxxxxxx>

---
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 ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux