Hi Domagoj,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]
[also build test WARNING on v4.20-rc7 next-20181219]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Domagoj-Pintaric/net-mvneta-add-basic-XDP_DROP-support/20181220-112012
config: parisc-allmodconfig (attached as .config)
compiler: hppa-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
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=parisc 

All warnings (new ones prefixed by >>):

   In file included from arch/parisc/include/asm/atomic.h:10:0,
                    from include/linux/atomic.h:7,
                    from arch/parisc/include/asm/bitops.h:13,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:11,
                    from include/linux/clk.h:16,
                    from drivers/net/ethernet/marvell/mvneta.c:14:
   drivers/net/ethernet/marvell/mvneta.c: In function 'mvneta_xdp_set':
   arch/parisc/include/asm/cmpxchg.h:48:3: warning: value computed is not used 
[-Wunused-value]
     ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/marvell/mvneta.c:3926:3: note: in expansion of macro 
>> 'xchg'
      xchg(&rxq->xdp_prog, pp->xdp_prog);
      ^~~~

vim +/xchg +3926 drivers/net/ethernet/marvell/mvneta.c

  3914  
  3915  static int mvneta_xdp_set(struct net_device *dev, struct bpf_prog 
*xdp_prog)
  3916  {
  3917          struct mvneta_port *pp = netdev_priv(dev);
  3918          struct bpf_prog *xdp_prog_old;
  3919          int queue;
  3920  
  3921          xdp_prog_old = xchg(&pp->xdp_prog, xdp_prog);
  3922  
  3923          for (queue = 0; queue < rxq_number; queue++) {
  3924                  struct mvneta_rx_queue *rxq = &pp->rxqs[queue];
  3925  
> 3926                  xchg(&rxq->xdp_prog, pp->xdp_prog);
  3927          }
  3928  
  3929          if (xdp_prog_old)
  3930                  bpf_prog_put(xdp_prog_old);
  3931  
  3932          return 0;
  3933  }
  3934  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to