Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH net-next v3] netdev-genl: Elide napi_id when not present
       [not found] <20250204192724.199209-1-jdamato@fastly.com>
@ 2025-02-05  9:22 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-05  9:22 UTC (permalink / raw)
  To: Joe Damato, netdev
  Cc: llvm, oe-kbuild-all, pabeni, edumazet, sridhar.samudrala,
	Joe Damato, Jakub Kicinski, Simon Horman, Stanislav Fomichev,
	Mina Almasry, linux-kernel

Hi Joe,

kernel test robot noticed the following build warnings:

[auto build test WARNING on c2933b2befe25309f4c5cfbea0ca80909735fd76]

url:    https://github.com/intel-lab-lkp/linux/commits/Joe-Damato/netdev-genl-Elide-napi_id-when-not-present/20250205-033024
base:   c2933b2befe25309f4c5cfbea0ca80909735fd76
patch link:    https://lore.kernel.org/r/20250204192724.199209-1-jdamato%40fastly.com
patch subject: [PATCH net-next v3] netdev-genl: Elide napi_id when not present
config: i386-buildonly-randconfig-006-20250205 (https://download.01.org/0day-ci/archive/20250205/202502051721.hL1sw85A-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250205/202502051721.hL1sw85A-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/202502051721.hL1sw85A-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/core/netdev-genl.c:380:23: warning: variable 'txq' set but not used [-Wunused-but-set-variable]
     380 |         struct netdev_queue *txq;
         |                              ^
>> net/core/netdev-genl.c:406:28: warning: variable 'rxq' is uninitialized when used here [-Wuninitialized]
     406 |                 if (nla_put_napi_id(rsp, rxq->napi))
         |                                          ^~~
   net/core/netdev-genl.c:379:29: note: initialize the variable 'rxq' to silence this warning
     379 |         struct netdev_rx_queue *rxq;
         |                                    ^
         |                                     = NULL
   2 warnings generated.


vim +/rxq +406 net/core/netdev-genl.c

   373	
   374	static int
   375	netdev_nl_queue_fill_one(struct sk_buff *rsp, struct net_device *netdev,
   376				 u32 q_idx, u32 q_type, const struct genl_info *info)
   377	{
   378		struct net_devmem_dmabuf_binding *binding;
   379		struct netdev_rx_queue *rxq;
   380		struct netdev_queue *txq;
   381		void *hdr;
   382	
   383		hdr = genlmsg_iput(rsp, info);
   384		if (!hdr)
   385			return -EMSGSIZE;
   386	
   387		if (nla_put_u32(rsp, NETDEV_A_QUEUE_ID, q_idx) ||
   388		    nla_put_u32(rsp, NETDEV_A_QUEUE_TYPE, q_type) ||
   389		    nla_put_u32(rsp, NETDEV_A_QUEUE_IFINDEX, netdev->ifindex))
   390			goto nla_put_failure;
   391	
   392		switch (q_type) {
   393		case NETDEV_QUEUE_TYPE_RX:
   394			rxq = __netif_get_rx_queue(netdev, q_idx);
   395			if (nla_put_napi_id(rsp, rxq->napi))
   396				goto nla_put_failure;
   397	
   398			binding = rxq->mp_params.mp_priv;
   399			if (binding &&
   400			    nla_put_u32(rsp, NETDEV_A_QUEUE_DMABUF, binding->id))
   401				goto nla_put_failure;
   402	
   403			break;
   404		case NETDEV_QUEUE_TYPE_TX:
   405			txq = netdev_get_tx_queue(netdev, q_idx);
 > 406			if (nla_put_napi_id(rsp, rxq->napi))
   407				goto nla_put_failure;
   408		}
   409	
   410		genlmsg_end(rsp, hdr);
   411	
   412		return 0;
   413	
   414	nla_put_failure:
   415		genlmsg_cancel(rsp, hdr);
   416		return -EMSGSIZE;
   417	}
   418	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-05  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250204192724.199209-1-jdamato@fastly.com>
2025-02-05  9:22 ` [PATCH net-next v3] netdev-genl: Elide napi_id when not present 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