[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110300405.InUyUmUJ-lkp@intel.com>
Date: Sat, 30 Oct 2021 04:51:16 +0800
From: kernel test robot <lkp@...el.com>
To: Petr Machata <petrm@...dia.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:petrm_soft_counters 5/5] net/core/dev.c:1678:2:
warning: enumeration value 'NETDEV_OFFLOAD_XSTATS_CMD' not handled in switch
tree: https://github.com/jpirko/linux_mlxsw petrm_soft_counters
head: 453f3cd9e64f05fe295e3807e7e9d7bda5d6a9c0
commit: 453f3cd9e64f05fe295e3807e7e9d7bda5d6a9c0 [5/5] wip
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/jpirko/linux_mlxsw/commit/453f3cd9e64f05fe295e3807e7e9d7bda5d6a9c0
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_soft_counters
git checkout 453f3cd9e64f05fe295e3807e7e9d7bda5d6a9c0
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
net/core/dev.c: In function 'netdev_cmd_to_name':
net/core/dev.c:1676:7: error: 'NETDEV_OFFLOAD_XSTATS_GET' undeclared (first use in this function); did you mean 'NETDEV_OFFLOAD_XSTATS_CMD'?
1676 | case NETDEV_##val: \
| ^~~~~~~
net/core/dev.c:1688:20: note: in expansion of macro 'N'
1688 | N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_GET)
| ^
net/core/dev.c:1676:7: note: each undeclared identifier is reported only once for each function it appears in
1676 | case NETDEV_##val: \
| ^~~~~~~
net/core/dev.c:1688:20: note: in expansion of macro 'N'
1688 | N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_GET)
| ^
>> net/core/dev.c:1678:2: warning: enumeration value 'NETDEV_OFFLOAD_XSTATS_CMD' not handled in switch [-Wswitch]
1678 | switch (cmd) {
| ^~~~~~
net/core/dev.c: In function 'netdev_offload_xstats_hw_stats_enable':
net/core/dev.c:8387:4: error: 'struct netdev_notifier_offload_xstats_info' has no member named 'req_stats'; did you mean 'hw_stats'?
8387 | .req_stats = req_hw_stats,
| ^~~~~~~~~
| hw_stats
>> net/core/dev.c:8383:52: warning: missing braces around initializer [-Wmissing-braces]
8383 | struct netdev_notifier_offload_xstats_info info = {
| ^
8384 | .info.dev = dev,
| }
8385 | .info.extack = extack,
| }
8386 | .cmd = NETDEV_OFFLOAD_XSTATS_CMD_ENABLE,
8387 | .req_stats = req_hw_stats,
| {
8388 | };
| }
net/core/dev.c: In function 'netdev_offload_xstats_hw_stats_disable':
net/core/dev.c:8423:6: warning: unused variable 'rc' [-Wunused-variable]
8423 | int rc;
| ^~
net/core/dev.c: At top level:
net/core/dev.c:8469:5: error: conflicting types for 'netdev_offload_xstats_hw_stats_get'
8469 | int netdev_offload_xstats_hw_stats_get(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from net/core/dev.c:90:
include/linux/netdevice.h:2905:5: note: previous declaration of 'netdev_offload_xstats_hw_stats_get' was here
2905 | int netdev_offload_xstats_hw_stats_get(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/dev.c: In function 'netdev_offload_xstats_hw_stats_get':
net/core/dev.c:8474:9: error: variable 'report_delta' has initializer but incomplete type
8474 | struct netdev_notifier_offload_xstats_rd report_delta = {};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/dev.c:8474:43: error: storage size of 'report_delta' isn't known
8474 | struct netdev_notifier_offload_xstats_rd report_delta = {};
| ^~~~~~~~~~~~
net/core/dev.c:8490:26: error: 'netdev' undeclared (first use in this function); did you mean 'net_eq'?
8490 | netdev_link_stats64_add(netdev->offload_hw_stats, &report_delta.stats);
| ^~~~~~
| net_eq
net/core/dev.c:8481:6: warning: unused variable 'err' [-Wunused-variable]
8481 | int err;
| ^~~
net/core/dev.c:8474:43: warning: unused variable 'report_delta' [-Wunused-variable]
8474 | struct netdev_notifier_offload_xstats_rd report_delta = {};
| ^~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/printk.h:8,
from include/asm-generic/bug.h:22,
from ./arch/um/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/um/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/uaccess.h:8,
from net/core/dev.c:71:
net/core/dev.c: At top level:
net/core/dev.c:8496:15: error: 'netdev_offload_xstats_get' undeclared here (not in a function); did you mean 'netdev_offload_xstats_cmd'?
8496 | EXPORT_SYMBOL(netdev_offload_xstats_get);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:29: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
net/core/dev.c:8496:1: note: in expansion of macro 'EXPORT_SYMBOL'
8496 | EXPORT_SYMBOL(netdev_offload_xstats_get);
| ^~~~~~~~~~~~~
net/core/dev.c: In function 'netdev_offload_xstats_report_delta':
net/core/dev.c:8505:14: error: dereferencing pointer to incomplete type 'struct netdev_notifier_offload_xstats_rd'
8505 | report_delta->hw_stats |= hw_stats;
| ^~
At top level:
net/core/dev.c:8363:12: warning: 'netdev_offload_xstats_toggle' defined but not used [-Wunused-function]
8363 | static int netdev_offload_xstats_toggle(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/NETDEV_OFFLOAD_XSTATS_CMD +1678 net/core/dev.c
56f5aa77cdad10 Michael Chan 2017-12-16 1672
ede2762d93ff16 Kirill Tkhai 2018-03-23 1673 const char *netdev_cmd_to_name(enum netdev_cmd cmd)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1674 {
ede2762d93ff16 Kirill Tkhai 2018-03-23 1675 #define N(val) \
ede2762d93ff16 Kirill Tkhai 2018-03-23 1676 case NETDEV_##val: \
ede2762d93ff16 Kirill Tkhai 2018-03-23 1677 return "NETDEV_" __stringify(val);
ede2762d93ff16 Kirill Tkhai 2018-03-23 @1678 switch (cmd) {
ede2762d93ff16 Kirill Tkhai 2018-03-23 1679 N(UP) N(DOWN) N(REBOOT) N(CHANGE) N(REGISTER) N(UNREGISTER)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1680 N(CHANGEMTU) N(CHANGEADDR) N(GOING_DOWN) N(CHANGENAME) N(FEAT_CHANGE)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1681 N(BONDING_FAILOVER) N(PRE_UP) N(PRE_TYPE_CHANGE) N(POST_TYPE_CHANGE)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1682 N(POST_INIT) N(RELEASE) N(NOTIFY_PEERS) N(JOIN) N(CHANGEUPPER)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1683 N(RESEND_IGMP) N(PRECHANGEMTU) N(CHANGEINFODATA) N(BONDING_INFO)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1684 N(PRECHANGEUPPER) N(CHANGELOWERSTATE) N(UDP_TUNNEL_PUSH_INFO)
ede2762d93ff16 Kirill Tkhai 2018-03-23 1685 N(UDP_TUNNEL_DROP_INFO) N(CHANGE_TX_QUEUE_LEN)
9daae9bd47cff8 Gal Pressman 2018-03-28 1686 N(CVLAN_FILTER_PUSH_INFO) N(CVLAN_FILTER_DROP_INFO)
9daae9bd47cff8 Gal Pressman 2018-03-28 1687 N(SVLAN_FILTER_PUSH_INFO) N(SVLAN_FILTER_DROP_INFO)
a8a72b09197b26 Petr Machata 2021-10-22 1688 N(PRE_CHANGEADDR) N(OFFLOAD_XSTATS_GET)
3f5ecd8a90dd55 Kirill Tkhai 2018-04-26 1689 }
ede2762d93ff16 Kirill Tkhai 2018-03-23 1690 #undef N
ede2762d93ff16 Kirill Tkhai 2018-03-23 1691 return "UNKNOWN_NETDEV_EVENT";
ede2762d93ff16 Kirill Tkhai 2018-03-23 1692 }
ede2762d93ff16 Kirill Tkhai 2018-03-23 1693 EXPORT_SYMBOL_GPL(netdev_cmd_to_name);
ede2762d93ff16 Kirill Tkhai 2018-03-23 1694
:::::: The code at line 1678 was first introduced by commit
:::::: ede2762d93ff16e0974f7446516b46b1022db213 net: Make NETDEV_XXX commands enum { }
:::::: TO: Kirill Tkhai <ktkhai@...tuozzo.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (9645 bytes)
Powered by blists - more mailing lists