All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-lts:5.4/preempt-rt 10686/19040] drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:999:25: warning: variable 'ch' set but not used
@ 2021-10-26  0:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-26  0:09 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head:   36a2ba81b7c7178b0612363a1af6f22887905cc6
commit: 4f766df18cbde3e137d265e5ca530a491a9450bf [10686/19040] net: stmmac: add need_wakeup support for FILL & TX processing in driver
config: x86_64-randconfig-a003-20211021 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel/linux-intel-lts/commit/4f766df18cbde3e137d265e5ca530a491a9450bf
        git remote add intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-lts 5.4/preempt-rt
        git checkout 4f766df18cbde3e137d265e5ca530a491a9450bf
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:999:25: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
           struct stmmac_channel *ch;
                                  ^
>> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:997:26: warning: variable 'rx_q' set but not used [-Wunused-but-set-variable]
           struct stmmac_rx_queue *rx_q;
                                   ^
   2 warnings generated.
--
>> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:997:26: warning: variable 'rx_q' set but not used [-Wunused-but-set-variable]
           struct stmmac_rx_queue *rx_q;
                                   ^
>> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:999:25: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
           struct stmmac_channel *ch;
                                  ^
   2 warnings generated.


vim +/ch +999 drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c

7544af8bd5bd27 Ong Boon Leong 2019-10-04   984  
7544af8bd5bd27 Ong Boon Leong 2019-10-04   985  /**
7544af8bd5bd27 Ong Boon Leong 2019-10-04   986   * stmmac_xsk_wakeup - Implements the ndo_xsk_wakeup
7544af8bd5bd27 Ong Boon Leong 2019-10-04   987   * @dev: the netdevice
7544af8bd5bd27 Ong Boon Leong 2019-10-04   988   * @queue_id: queue id to wake up
7544af8bd5bd27 Ong Boon Leong 2019-10-04   989   *
7544af8bd5bd27 Ong Boon Leong 2019-10-04   990   * Returns <0 for errors, 0 otherwise.
7544af8bd5bd27 Ong Boon Leong 2019-10-04   991   **/
7544af8bd5bd27 Ong Boon Leong 2019-10-04   992  int stmmac_xsk_wakeup(struct net_device *dev, u32 queue, u32 flags)
7544af8bd5bd27 Ong Boon Leong 2019-10-04   993  {
7544af8bd5bd27 Ong Boon Leong 2019-10-04   994  	struct stmmac_priv *priv = netdev_priv(dev);
7544af8bd5bd27 Ong Boon Leong 2019-10-04   995  	u16 qp_num = priv->plat->num_queue_pairs;
7544af8bd5bd27 Ong Boon Leong 2019-10-04   996  	struct stmmac_tx_queue *xdp_q;
4f766df18cbde3 Ong Boon Leong 2020-05-24  @997  	struct stmmac_rx_queue *rx_q;
4f766df18cbde3 Ong Boon Leong 2020-05-24   998  	struct stmmac_channel *rx_ch;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  @999  	struct stmmac_channel *ch;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1000  
4f766df18cbde3 Ong Boon Leong 2020-05-24  1001  	/* queue index is relative to XDP Queue ID.
4f766df18cbde3 Ong Boon Leong 2020-05-24  1002  	 * XDP Q(N) maps: XDP TXQ[qp+N], SKB TXQ[N] & XDP/SKB RXQ[N]
4f766df18cbde3 Ong Boon Leong 2020-05-24  1003  	 * where 0 < N < qp_num
4f766df18cbde3 Ong Boon Leong 2020-05-24  1004  	 */
4f766df18cbde3 Ong Boon Leong 2020-05-24  1005  	xdp_q = get_tx_queue(priv, queue + qp_num);
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1006  	ch = &priv->channel[queue + qp_num];
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1007  
4f766df18cbde3 Ong Boon Leong 2020-05-24  1008  	rx_q = &priv->rx_queue[queue];
4f766df18cbde3 Ong Boon Leong 2020-05-24  1009  	rx_ch = &priv->channel[queue];
4f766df18cbde3 Ong Boon Leong 2020-05-24  1010  
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1011  	if (test_bit(STMMAC_DOWN, &priv->state))
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1012  		return -ENETDOWN;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1013  
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1014  	if (!stmmac_enabled_xdp(priv))
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1015  		return -ENXIO;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1016  
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1017  	if (queue >= priv->plat->num_queue_pairs)
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1018  		return -ENXIO;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1019  
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1020  	if (!xdp_q->xsk_umem)
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1021  		return -ENXIO;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1022  
4f766df18cbde3 Ong Boon Leong 2020-05-24  1023  	if (flags & XDP_WAKEUP_TX)
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1024  		stmmac_xmit_zc(xdp_q, priv->dma_tx_size);
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1025  
4f766df18cbde3 Ong Boon Leong 2020-05-24  1026  	if (flags & XDP_WAKEUP_RX &&
4f766df18cbde3 Ong Boon Leong 2020-05-24  1027  	    !napi_if_scheduled_mark_missed(&rx_ch->rx_napi)) {
4f766df18cbde3 Ong Boon Leong 2020-05-24  1028  		if (likely(napi_schedule_prep(&rx_ch->rx_napi)))
4f766df18cbde3 Ong Boon Leong 2020-05-24  1029  			__napi_schedule(&rx_ch->rx_napi);
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1030  	}
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1031  
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1032  	return 0;
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1033  }
7544af8bd5bd27 Ong Boon Leong 2019-10-04  1034  

:::::: The code at line 999 was first introduced by commit
:::::: 7544af8bd5bd27b550fcf305257e2092726cafc5 net: stmmac: add AF_XDP zero-copy Tx support

:::::: TO: Ong Boon Leong <boon.leong.ong@intel.com>
:::::: CC: Voon Weifeng <weifeng.voon@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34804 bytes --]

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

only message in thread, other threads:[~2021-10-26  0:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-26  0:09 [intel-lts:5.4/preempt-rt 10686/19040] drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:999:25: warning: variable 'ch' set but not used 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.