All of lore.kernel.org
 help / color / mirror / Atom feed
* net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2022-03-28  6:28 kernel test robot
  2022-03-28 17:17   ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2022-03-28  6:28 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: kbuild-all, linux-kernel, Jakub Kicinski, Brian Vazquez

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ae085d7f9365de7da27ab5c0d16b12d51ea7fca9
commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
date:   2 weeks ago
config: riscv-randconfig-s032-20220328 (https://download.01.org/0day-ci/archive/20220328/202203281436.hsNgYWWu-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
   net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
   net/core/dev.c:3254:23: sparse:     got unsigned int
   net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
   net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
   net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block

vim +/__percpu +10290 net/core/dev.c

 10282	
 10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
 10284	{
 10285		struct net_device_core_stats __percpu *p;
 10286	
 10287		p = alloc_percpu_gfp(struct net_device_core_stats,
 10288				     GFP_ATOMIC | __GFP_NOWARN);
 10289	
 10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
 10291			free_percpu(p);
 10292	
 10293		/* This READ_ONCE() pairs with the cmpxchg() above */
 10294		p = READ_ONCE(dev->core_stats);
 10295		if (!p)
 10296			return NULL;
 10297	
 10298		return this_cpu_ptr(p);
 10299	}
 10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
 10301	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
  2022-03-28  6:28 net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression kernel test robot
  2022-03-28 17:17   ` Jakub Kicinski
@ 2022-03-28 17:17   ` Jakub Kicinski
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-28 17:17 UTC (permalink / raw)
  To: kernel test robot
  Cc: Eric Dumazet, kbuild-all, linux-kernel, Brian Vazquez, linux-riscv

CC: riscv, is there something special about cmpxchg() on that arch?
We don't see it on x86, and I don't see anything special in the code
for riscv, at least on 5.17.

On Mon, 28 Mar 2022 14:28:34 +0800 kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   ae085d7f9365de7da27ab5c0d16b12d51ea7fca9
> commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
> date:   2 weeks ago
> config: riscv-randconfig-s032-20220328 (https://download.01.org/0day-ci/archive/20220328/202203281436.hsNgYWWu-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 11.2.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.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
>    net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
>    net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
>    net/core/dev.c:3254:23: sparse:     got unsigned int
>    net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
> >> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression  
>    net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
>    net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
> 
> vim +/__percpu +10290 net/core/dev.c
> 
>  10282	
>  10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
>  10284	{
>  10285		struct net_device_core_stats __percpu *p;
>  10286	
>  10287		p = alloc_percpu_gfp(struct net_device_core_stats,
>  10288				     GFP_ATOMIC | __GFP_NOWARN);
>  10289	
>  10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
>  10291			free_percpu(p);
>  10292	
>  10293		/* This READ_ONCE() pairs with the cmpxchg() above */
>  10294		p = READ_ONCE(dev->core_stats);
>  10295		if (!p)
>  10296			return NULL;
>  10297	
>  10298		return this_cpu_ptr(p);
>  10299	}
>  10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
>  10301	
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2022-03-28 17:17   ` Jakub Kicinski
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-28 17:17 UTC (permalink / raw)
  To: kernel test robot
  Cc: Eric Dumazet, kbuild-all, linux-kernel, Brian Vazquez, linux-riscv

CC: riscv, is there something special about cmpxchg() on that arch?
We don't see it on x86, and I don't see anything special in the code
for riscv, at least on 5.17.

On Mon, 28 Mar 2022 14:28:34 +0800 kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   ae085d7f9365de7da27ab5c0d16b12d51ea7fca9
> commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
> date:   2 weeks ago
> config: riscv-randconfig-s032-20220328 (https://download.01.org/0day-ci/archive/20220328/202203281436.hsNgYWWu-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 11.2.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.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
>    net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
>    net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
>    net/core/dev.c:3254:23: sparse:     got unsigned int
>    net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
> >> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression  
>    net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
>    net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
> 
> vim +/__percpu +10290 net/core/dev.c
> 
>  10282	
>  10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
>  10284	{
>  10285		struct net_device_core_stats __percpu *p;
>  10286	
>  10287		p = alloc_percpu_gfp(struct net_device_core_stats,
>  10288				     GFP_ATOMIC | __GFP_NOWARN);
>  10289	
>  10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
>  10291			free_percpu(p);
>  10292	
>  10293		/* This READ_ONCE() pairs with the cmpxchg() above */
>  10294		p = READ_ONCE(dev->core_stats);
>  10295		if (!p)
>  10296			return NULL;
>  10297	
>  10298		return this_cpu_ptr(p);
>  10299	}
>  10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
>  10301	
> 


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2022-03-28 17:17   ` Jakub Kicinski
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-28 17:17 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]

CC: riscv, is there something special about cmpxchg() on that arch?
We don't see it on x86, and I don't see anything special in the code
for riscv, at least on 5.17.

On Mon, 28 Mar 2022 14:28:34 +0800 kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   ae085d7f9365de7da27ab5c0d16b12d51ea7fca9
> commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
> date:   2 weeks ago
> config: riscv-randconfig-s032-20220328 (https://download.01.org/0day-ci/archive/20220328/202203281436.hsNgYWWu-lkp(a)intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 11.2.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.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
>    net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
>    net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
>    net/core/dev.c:3254:23: sparse:     got unsigned int
>    net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
> >> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression  
>    net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
>    net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
> 
> vim +/__percpu +10290 net/core/dev.c
> 
>  10282	
>  10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
>  10284	{
>  10285		struct net_device_core_stats __percpu *p;
>  10286	
>  10287		p = alloc_percpu_gfp(struct net_device_core_stats,
>  10288				     GFP_ATOMIC | __GFP_NOWARN);
>  10289	
>  10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
>  10291			free_percpu(p);
>  10292	
>  10293		/* This READ_ONCE() pairs with the cmpxchg() above */
>  10294		p = READ_ONCE(dev->core_stats);
>  10295		if (!p)
>  10296			return NULL;
>  10297	
>  10298		return this_cpu_ptr(p);
>  10299	}
>  10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
>  10301	
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2023-12-19 13:29 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-12-19 13:29 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: oe-kbuild-all, linux-kernel, Jakub Kicinski, Brian Vazquez

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2cf4f94d8e8646803f8fb0facf134b0cd7fb691a
commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
date:   1 year, 9 months ago
config: riscv-buildonly-randconfig-r006-20230429 (https://download.01.org/0day-ci/archive/20231219/202312192120.8ogDR8Em-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231219/202312192120.8ogDR8Em-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312192120.8ogDR8Em-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
   net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
   net/core/dev.c:3254:23: sparse:     got unsigned int
   net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
   net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
   net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block

vim +/__percpu +10290 net/core/dev.c

 10282	
 10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
 10284	{
 10285		struct net_device_core_stats __percpu *p;
 10286	
 10287		p = alloc_percpu_gfp(struct net_device_core_stats,
 10288				     GFP_ATOMIC | __GFP_NOWARN);
 10289	
 10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
 10291			free_percpu(p);
 10292	
 10293		/* This READ_ONCE() pairs with the cmpxchg() above */
 10294		p = READ_ONCE(dev->core_stats);
 10295		if (!p)
 10296			return NULL;
 10297	
 10298		return this_cpu_ptr(p);
 10299	}
 10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
 10301	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2022-07-13 15:48 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-07-13 15:48 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: kbuild-all, linux-kernel, Jakub Kicinski, Brian Vazquez

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b047602d579b4fb028128a525f056bbdc890e7f0
commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
date:   4 months ago
config: riscv-randconfig-s032-20220713 (https://download.01.org/0day-ci/archive/20220713/202207132315.QFxcZZNI-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
   net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
   net/core/dev.c:3254:23: sparse:     got unsigned int
   net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
   net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
   net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block

vim +/__percpu +10290 net/core/dev.c

 10282	
 10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
 10284	{
 10285		struct net_device_core_stats __percpu *p;
 10286	
 10287		p = alloc_percpu_gfp(struct net_device_core_stats,
 10288				     GFP_ATOMIC | __GFP_NOWARN);
 10289	
 10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
 10291			free_percpu(p);
 10292	
 10293		/* This READ_ONCE() pairs with the cmpxchg() above */
 10294		p = READ_ONCE(dev->core_stats);
 10295		if (!p)
 10296			return NULL;
 10297	
 10298		return this_cpu_ptr(p);
 10299	}
 10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
 10301	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
@ 2022-06-05  0:46 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-06-05  0:46 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: kbuild-all, linux-kernel, Jakub Kicinski, Brian Vazquez

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d0e60d46bc03252b8d4ffaaaa0b371970ac16cda
commit: 625788b5844511cf4c30cffa7fa0bc3a69cebc82 net: add per-cpu storage and net->core_stats
date:   3 months ago
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20220605/202206050845.IJUsAUy8-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.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.4-18-g56afb504-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=625788b5844511cf4c30cffa7fa0bc3a69cebc82
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 625788b5844511cf4c30cffa7fa0bc3a69cebc82
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   net/core/dev.c:3254:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
   net/core/dev.c:3254:23: sparse:     expected restricted __wsum [usertype] csum
   net/core/dev.c:3254:23: sparse:     got unsigned int
   net/core/dev.c:3254:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression
   net/core/dev.c:3759:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
   net/core/dev.c:4961:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block

vim +/__percpu +10290 net/core/dev.c

 10282	
 10283	struct net_device_core_stats *netdev_core_stats_alloc(struct net_device *dev)
 10284	{
 10285		struct net_device_core_stats __percpu *p;
 10286	
 10287		p = alloc_percpu_gfp(struct net_device_core_stats,
 10288				     GFP_ATOMIC | __GFP_NOWARN);
 10289	
 10290		if (p && cmpxchg(&dev->core_stats, NULL, p))
 10291			free_percpu(p);
 10292	
 10293		/* This READ_ONCE() pairs with the cmpxchg() above */
 10294		p = READ_ONCE(dev->core_stats);
 10295		if (!p)
 10296			return NULL;
 10297	
 10298		return this_cpu_ptr(p);
 10299	}
 10300	EXPORT_SYMBOL(netdev_core_stats_alloc);
 10301	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-19 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  6:28 net/core/dev.c:10290:18: sparse: sparse: cast removes address space '__percpu' of expression kernel test robot
2022-03-28 17:17 ` Jakub Kicinski
2022-03-28 17:17   ` Jakub Kicinski
2022-03-28 17:17   ` Jakub Kicinski
2022-06-05  0:46 kernel test robot
2022-07-13 15:48 kernel test robot
2023-12-19 13:29 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.