Hi,

Thank you for the patch! Yet something to improve:

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

url:    
https://github.com/0day-ci/linux/commits/izabela-bakollari-gmail-com/dropwatch-Support-monitoring-of-dropped-frames/20200708-011806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
d47a72152097d7be7cfc453d205196c0aa976c33
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All error/warnings (new ones prefixed by >>):

>> net/core/drop_monitor.c:226:21: warning: variable 'data' is uninitialized 
>> when used here [-Wuninitialized]
           spin_lock_irqsave(&data->lock, flags);
                              ^~~~
   include/linux/spinlock.h:383:39: note: expanded from macro 
'spin_lock_irqsave'
           raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
                                                ^~~~
   include/linux/spinlock.h:251:34: note: expanded from macro 
'raw_spin_lock_irqsave'
                   flags = _raw_spin_lock_irqsave(lock);   \
                                                  ^~~~
   net/core/drop_monitor.c:223:30: note: initialize the variable 'data' to 
silence this warning
           struct per_cpu_dm_data *data;
                                       ^
                                        = NULL
>> net/core/drop_monitor.c:1375:47: error: no member named 'ifname' in 'struct 
>> net_device'; did you mean 'name'?
                           rc = net_dm_interface_stop(net, interface->ifname);
                                                                      ^~~~~~
                                                                      name
   include/linux/netdevice.h:1844:9: note: 'name' declared here
           char                    name[IFNAMSIZ];
                                   ^
   1 warning and 1 error generated.

vim +1375 net/core/drop_monitor.c

  1357  
  1358  static int net_dm_cmd_ifc_trace(struct sk_buff *skb, struct genl_info 
*info)
  1359  {
  1360          struct net *net = sock_net(skb->sk);
  1361          char ifname[IFNAMSIZ];
  1362          int rc;
  1363  
  1364          memset(ifname, 0, IFNAMSIZ);
  1365          nla_strlcpy(ifname, info->attrs[NET_DM_ATTR_IFNAME], IFNAMSIZ - 
1);
  1366  
  1367          switch (info->genlhdr->cmd) {
  1368          case NET_DM_CMD_START_IFC:
  1369                  rc = net_dm_interface_start(net, ifname);
  1370                  if (rc)
  1371                          return rc;
  1372                  break;
  1373          case NET_DM_CMD_STOP_IFC:
  1374                  if (interface) {
> 1375                          rc = net_dm_interface_stop(net, 
> interface->ifname);
  1376                          return rc;
  1377                  } else {
  1378                          return -ENODEV;
  1379                  }
  1380          }
  1381  
  1382          return 0;
  1383  }
  1384  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to