Thread (36 messages) 36 messages, 6 authors, 2022-05-23

Re: [PATCH net-next 08/19] drop_monitor: add net device refcount tracker

flat view

From: Eric Dumazet <hidden>
Date: 2021-12-02 05:57:36
Also in: oe-kbuild-all

On Wed, Dec 1, 2021 at 9:41 PM kernel test robot [off-list ref] wrote:
Hi Eric,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-add-preliminary-netdev-refcount-tracking/20211202-112353
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8057cbb8335cf6d419866737504473833e1d128a
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20211202/202112021345.IlporM5t-lkp@intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/6b336d0b301ebb1097132101a9e3bd01f71c40d4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Eric-Dumazet/net-add-preliminary-netdev-refcount-tracking/20211202-112353
        git checkout 6b336d0b301ebb1097132101a9e3bd01f71c40d4
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All warnings (new ones prefixed by >>):

   net/core/drop_monitor.c: In function 'net_dm_hw_metadata_free':
quoted
quoted
net/core/drop_monitor.c:869:47: warning: passing argument 2 of 'dev_put_track' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     869 |         dev_put_track(hw_metadata->input_dev, &hw_metadata->dev_tracker);
         |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/core/drop_monitor.c:10:
   include/linux/netdevice.h:3863:53: note: expected 'struct ref_tracker **' but argument is of type 'struct ref_tracker * const*'
    3863 |                                  netdevice_tracker *tracker)
         |                                  ~~~~~~~~~~~~~~~~~~~^~~~~~~


vim +869 net/core/drop_monitor.c

   865
   866  static void
   867  net_dm_hw_metadata_free(const struct devlink_trap_metadata *hw_metadata)
Yep, I have removed this not really useful  const qualifier

net_dm_hw_metadata_free(struct devlink_trap_metadata *hw_metadata)
...

   868  {
 > 869          dev_put_track(hw_metadata->input_dev, &hw_metadata->dev_tracker);
   870          kfree(hw_metadata->fa_cookie);
   871          kfree(hw_metadata->trap_name);
   872          kfree(hw_metadata->trap_group_name);
   873          kfree(hw_metadata);
   874  }
   875

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help