[rdma:for-next 16/50] drivers/infiniband/hw/mlx4/cm.c:496:48: sparse: sparse: incorrect type in initializer (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/rdma/rdma.git for-next
head:   524d8ffd07f0ca10b24011487339f836ed859b32
commit: 227a0e142e375909959a74b7782403e14331f6f3 [16/50] IB/mlx4: Add support for REJ due to timeout
config: i386-randconfig-s001-20200902 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 227a0e142e375909959a74b7782403e14331f6f3
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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/infiniband/hw/mlx4/cm.c:496:48: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct rej_tmout_entry *item @@     got void [noderef] __rcu * @@
>> drivers/infiniband/hw/mlx4/cm.c:496:48: sparse:     expected struct rej_tmout_entry *item
>> drivers/infiniband/hw/mlx4/cm.c:496:48: sparse:     got void [noderef] __rcu *

# https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=227a0e142e375909959a74b7782403e14331f6f3
git remote add rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
git fetch --no-tags rdma for-next
git checkout 227a0e142e375909959a74b7782403e14331f6f3
vim +496 drivers/infiniband/hw/mlx4/cm.c

   486	
   487	static void rej_tmout_tree_cleanup(struct mlx4_ib_sriov *sriov, int slave)
   488	{
   489		struct radix_tree_iter iter;
   490		bool flush_needed = false;
   491		__rcu void **slot;
   492		int cnt = 0;
   493	
   494		mutex_lock(&sriov->rej_tmout_lock);
   495		radix_tree_for_each_slot(slot, &sriov->rej_tmout_root, &iter, 0) {
 > 496			struct rej_tmout_entry *item = *slot;
   497	
   498			if (slave < 0 || slave == item->slave) {
   499				mod_delayed_work(system_wq, &item->timeout, 0);
   500				flush_needed = true;
   501				++cnt;
   502			}
   503		}
   504		mutex_unlock(&sriov->rej_tmout_lock);
   505	
   506		if (flush_needed) {
   507			flush_scheduled_work();
   508			pr_debug("Deleted %d entries in radix_tree for slave %d during cleanup\n",
   509				 slave, cnt);
   510		}
   511	}
   512	

---
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 USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux