Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config
       [not found] <20241218165843.744647-5-ahmed.zaki@intel.com>
@ 2024-12-18 20:16 ` kernel test robot
  2024-12-18 20:27 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-18 20:16 UTC (permalink / raw)
  To: Ahmed Zaki, netdev
  Cc: llvm, oe-kbuild-all, intel-wired-lan, andrew+netdev, edumazet,
	kuba, pabeni, davem, michael.chan, tariqt, anthony.l.nguyen,
	przemyslaw.kitszel, jdamato, shayd, akpm, Ahmed Zaki

Hi Ahmed,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Ahmed-Zaki/net-napi-add-irq_flags-to-napi-struct/20241219-010125
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241218165843.744647-5-ahmed.zaki%40intel.com
patch subject: [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config
config: arm-randconfig-001-20241219 (https://download.01.org/0day-ci/archive/20241219/202412190421.N2xtn20H-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241219/202412190421.N2xtn20H-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/202412190421.N2xtn20H-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/core/dev.c:6716:6: warning: unused variable 'rc' [-Wunused-variable]
    6716 |         int rc;
         |             ^~
   net/core/dev.c:6746:7: warning: unused variable 'rc' [-Wunused-variable]
    6746 |         int  rc;
         |              ^~
>> net/core/dev.c:6766:7: warning: variable 'glue_created' is uninitialized when used here [-Wuninitialized]
    6766 |         if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
         |              ^~~~~~~~~~~~
   net/core/dev.c:6745:19: note: initialize the variable 'glue_created' to silence this warning
    6745 |         bool glue_created;
         |                          ^
         |                           = 0
   3 warnings generated.


vim +/glue_created +6766 net/core/dev.c

  6765	
> 6766		if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
  6767			glue = kzalloc(sizeof(*glue), GFP_KERNEL);
  6768			if (!glue)
  6769				return;
  6770			glue->notify.notify = netif_irq_cpu_rmap_notify;
  6771			glue->notify.release = netif_napi_affinity_release;
  6772			glue->data = napi;
  6773			glue->rmap = NULL;
  6774			napi->irq_flags |= NAPIF_IRQ_NORMAP;
  6775		}
  6776	}
  6777	EXPORT_SYMBOL(netif_napi_set_irq);
  6778	

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

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

* Re: [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config
       [not found] <20241218165843.744647-5-ahmed.zaki@intel.com>
  2024-12-18 20:16 ` [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config kernel test robot
@ 2024-12-18 20:27 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-18 20:27 UTC (permalink / raw)
  To: Ahmed Zaki, netdev
  Cc: llvm, oe-kbuild-all, intel-wired-lan, andrew+netdev, edumazet,
	kuba, pabeni, davem, michael.chan, tariqt, anthony.l.nguyen,
	przemyslaw.kitszel, jdamato, shayd, akpm, Ahmed Zaki

Hi Ahmed,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Ahmed-Zaki/net-napi-add-irq_flags-to-napi-struct/20241219-010125
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241218165843.744647-5-ahmed.zaki%40intel.com
patch subject: [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config
config: riscv-randconfig-001-20241219 (https://download.01.org/0day-ci/archive/20241219/202412190454.nwvp3hU2-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241219/202412190454.nwvp3hU2-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/202412190454.nwvp3hU2-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/core/dev.c:6755:7: warning: variable 'glue_created' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
                   if (rc) {
                       ^~
   net/core/dev.c:6766:7: note: uninitialized use occurs here
           if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
                ^~~~~~~~~~~~
   net/core/dev.c:6755:3: note: remove the 'if' if its condition is always false
                   if (rc) {
                   ^~~~~~~~~
>> net/core/dev.c:6752:6: warning: variable 'glue_created' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (napi->dev->rx_cpu_rmap && flags & NAPIF_IRQ_ARFS_RMAP) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/dev.c:6766:7: note: uninitialized use occurs here
           if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
                ^~~~~~~~~~~~
   net/core/dev.c:6752:2: note: remove the 'if' if its condition is always true
           if (napi->dev->rx_cpu_rmap && flags & NAPIF_IRQ_ARFS_RMAP) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/core/dev.c:6752:6: warning: variable 'glue_created' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
           if (napi->dev->rx_cpu_rmap && flags & NAPIF_IRQ_ARFS_RMAP) {
               ^~~~~~~~~~~~~~~~~~~~~~
   net/core/dev.c:6766:7: note: uninitialized use occurs here
           if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
                ^~~~~~~~~~~~
   net/core/dev.c:6752:6: note: remove the '&&' if its condition is always true
           if (napi->dev->rx_cpu_rmap && flags & NAPIF_IRQ_ARFS_RMAP) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/dev.c:6745:19: note: initialize the variable 'glue_created' to silence this warning
           bool glue_created;
                            ^
                             = 0
   net/core/dev.c:4176:1: warning: unused function 'sch_handle_ingress' [-Wunused-function]
   sch_handle_ingress(struct sk_buff *skb, struct packet_type **pt_prev, int *ret,
   ^
   net/core/dev.c:4183:1: warning: unused function 'sch_handle_egress' [-Wunused-function]
   sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
   ^
   net/core/dev.c:5440:19: warning: unused function 'nf_ingress' [-Wunused-function]
   static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
                     ^
   6 warnings generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
   Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
   Selected by [m]:
   - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=m] && DRM_XE [=m] && DRM_XE [=m]=m [=m] && HAS_IOPORT [=y]


vim +6755 net/core/dev.c

8e5191fb19bffce Ahmed Zaki 2024-12-18  6741  
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6742  void netif_napi_set_irq(struct napi_struct *napi, int irq, unsigned long flags)
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6743  {
8e5191fb19bffce Ahmed Zaki 2024-12-18  6744  	struct irq_glue *glue = NULL;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6745  	bool glue_created;
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6746  	int  rc;
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6747  
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6748  	napi->irq = irq;
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6749  	napi->irq_flags = flags;
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6750  
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6751  #ifdef CONFIG_RFS_ACCEL
a274d2669a73ef7 Ahmed Zaki 2024-12-18 @6752  	if (napi->dev->rx_cpu_rmap && flags & NAPIF_IRQ_ARFS_RMAP) {
8e5191fb19bffce Ahmed Zaki 2024-12-18  6753  		rc = irq_cpu_rmap_add(napi->dev->rx_cpu_rmap, irq, napi,
8e5191fb19bffce Ahmed Zaki 2024-12-18  6754  				      netif_irq_cpu_rmap_notify);
a274d2669a73ef7 Ahmed Zaki 2024-12-18 @6755  		if (rc) {
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6756  			netdev_warn(napi->dev, "Unable to update ARFS map (%d).\n",
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6757  				    rc);
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6758  			free_irq_cpu_rmap(napi->dev->rx_cpu_rmap);
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6759  			napi->dev->rx_cpu_rmap = NULL;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6760  		} else {
8e5191fb19bffce Ahmed Zaki 2024-12-18  6761  			glue_created = true;
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6762  		}
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6763  	}
a274d2669a73ef7 Ahmed Zaki 2024-12-18  6764  #endif
8e5191fb19bffce Ahmed Zaki 2024-12-18  6765  
8e5191fb19bffce Ahmed Zaki 2024-12-18  6766  	if (!glue_created && flags & NAPIF_IRQ_AFFINITY) {
8e5191fb19bffce Ahmed Zaki 2024-12-18  6767  		glue = kzalloc(sizeof(*glue), GFP_KERNEL);
8e5191fb19bffce Ahmed Zaki 2024-12-18  6768  		if (!glue)
8e5191fb19bffce Ahmed Zaki 2024-12-18  6769  			return;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6770  		glue->notify.notify = netif_irq_cpu_rmap_notify;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6771  		glue->notify.release = netif_napi_affinity_release;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6772  		glue->data = napi;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6773  		glue->rmap = NULL;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6774  		napi->irq_flags |= NAPIF_IRQ_NORMAP;
8e5191fb19bffce Ahmed Zaki 2024-12-18  6775  	}
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6776  }
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6777  EXPORT_SYMBOL(netif_napi_set_irq);
001dc6db21f4bfe Ahmed Zaki 2024-12-18  6778  

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

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

end of thread, other threads:[~2024-12-18 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20241218165843.744647-5-ahmed.zaki@intel.com>
2024-12-18 20:16 ` [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config kernel test robot
2024-12-18 20:27 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox