drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4205:3: note: in expansion of macro 'xchg'

From: kbuild test robot
Date: Thu May 17 2018 - 02:14:24 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e6506eb241871d68647c53cb6d0a16299550ae97
commit: c7aec59657b60f3a29fc7d3274ebefd698879301 ixgbevf: Add XDP support for pass and drop actions
date: 8 weeks ago
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7aec59657b60f3a29fc7d3274ebefd698879301
# save the attached .config to linux build tree
make.cross ARCH=sparc

All warnings (new ones prefixed by >>):

In file included from arch/sparc/include/asm/cmpxchg.h:5:0,
from arch/sparc/include/asm/atomic_64.h:12,
from arch/sparc/include/asm/atomic.h:5,
from include/linux/atomic.h:5,
from include/asm-generic/qspinlock_types.h:28,
from arch/sparc/include/asm/spinlock_types.h:6,
from include/linux/spinlock_types.h:13,
from include/linux/spinlock.h:82,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:35:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function 'ixgbevf_xdp_setup':
arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value]
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4205:3: note: in expansion of macro 'xchg'
xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog);
^~~~

vim +/xchg +4205 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

4188
4189 static int ixgbevf_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
4190 {
4191 int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
4192 struct ixgbevf_adapter *adapter = netdev_priv(dev);
4193 struct bpf_prog *old_prog;
4194
4195 /* verify ixgbevf ring attributes are sufficient for XDP */
4196 for (i = 0; i < adapter->num_rx_queues; i++) {
4197 struct ixgbevf_ring *ring = adapter->rx_ring[i];
4198
4199 if (frame_size > ixgbevf_rx_bufsz(ring))
4200 return -EINVAL;
4201 }
4202
4203 old_prog = xchg(&adapter->xdp_prog, prog);
4204 for (i = 0; i < adapter->num_rx_queues; i++)
> 4205 xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog);
4206
4207 if (old_prog)
4208 bpf_prog_put(old_prog);
4209
4210 return 0;
4211 }
4212

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip