[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108170651.5ErPl7dh-lkp@intel.com>
Date: Tue, 17 Aug 2021 06:29:00 +0800
From: kernel test robot <lkp@...el.com>
To: Jiri Pirko <jiri@...dia.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:linecards 60/118] net/core/devlink.c:1987:39: error:
'devlink_list' undeclared; did you mean 'devlink_sb'?
tree: https://github.com/jpirko/linux_mlxsw linecards
head: 6b580f8d58828d310d04bfebc84f991ed36cdb46
commit: 9c59c78fc8363db10148c774d2bbd66349a00e5f [60/118] devlink: add support to create line card and expose to user
config: sh-allmodconfig (attached as .config)
compiler: sh4-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/jpirko/linux_mlxsw/commit/9c59c78fc8363db10148c774d2bbd66349a00e5f
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw linecards
git checkout 9c59c78fc8363db10148c774d2bbd66349a00e5f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash net/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from net/core/devlink.c:10:
net/core/devlink.c: In function 'devlink_nl_cmd_linecard_get_dumpit':
>> net/core/devlink.c:1987:39: error: 'devlink_list' undeclared (first use in this function); did you mean 'devlink_sb'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~
include/linux/kernel.h:494:33: note: in definition of macro 'container_of'
494 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/list.h:522:9: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:20: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
net/core/devlink.c:1987:39: note: each undeclared identifier is reported only once for each function it appears in
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~
include/linux/kernel.h:494:33: note: in definition of macro 'container_of'
494 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/list.h:522:9: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:20: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:308:23: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:495:27: note: in expansion of macro '__same_type'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:522:9: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:20: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:140:63: note: in definition of macro '__compiler_offsetof'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^
include/linux/kernel.h:498:28: note: in expansion of macro 'offsetof'
498 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:522:9: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:20: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/module.h:12,
from net/core/devlink.c:11:
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/list.h:619:16: note: in definition of macro 'list_entry_is_head'
619 | (&pos->member == (head))
| ^~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
In file included from net/core/devlink.c:10:
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/kernel.h:494:33: note: in definition of macro 'container_of'
494 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/list.h:555:9: note: in expansion of macro 'list_entry'
555 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:630:20: note: in expansion of macro 'list_next_entry'
630 | pos = list_next_entry(pos, member))
| ^~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:308:23: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:495:27: note: in expansion of macro '__same_type'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:555:9: note: in expansion of macro 'list_entry'
555 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:630:20: note: in expansion of macro 'list_next_entry'
630 | pos = list_next_entry(pos, member))
| ^~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:308:23: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:495:27: note: in expansion of macro '__same_type'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:555:9: note: in expansion of macro 'list_entry'
555 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:630:20: note: in expansion of macro 'list_next_entry'
630 | pos = list_next_entry(pos, member))
| ^~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:308:23: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:496:27: note: in expansion of macro '__same_type'
496 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:555:9: note: in expansion of macro 'list_entry'
555 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:630:20: note: in expansion of macro 'list_next_entry'
630 | pos = list_next_entry(pos, member))
| ^~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
>> net/core/devlink.c:1987:53: error: 'struct devlink' has no member named 'list'; did you mean 'sb_list'?
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~
include/linux/compiler_types.h:140:63: note: in definition of macro '__compiler_offsetof'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^
include/linux/kernel.h:498:28: note: in expansion of macro 'offsetof'
498 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:555:9: note: in expansion of macro 'list_entry'
555 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:630:20: note: in expansion of macro 'list_next_entry'
630 | pos = list_next_entry(pos, member))
| ^~~~~~~~~~~~~~~
net/core/devlink.c:1987:9: note: in expansion of macro 'list_for_each_entry'
1987 | list_for_each_entry(devlink, &devlink_list, list) {
| ^~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +1987 net/core/devlink.c
1976
1977 static int devlink_nl_cmd_linecard_get_dumpit(struct sk_buff *msg,
1978 struct netlink_callback *cb)
1979 {
1980 struct devlink_linecard *linecard;
1981 struct devlink *devlink;
1982 int start = cb->args[0];
1983 int idx = 0;
1984 int err;
1985
1986 mutex_lock(&devlink_mutex);
> 1987 list_for_each_entry(devlink, &devlink_list, list) {
1988 if (!net_eq(devlink_net(devlink), sock_net(msg->sk)))
1989 continue;
1990 mutex_lock(&devlink->lock);
1991 list_for_each_entry(linecard, &devlink->linecard_list, list) {
1992 if (idx < start) {
1993 idx++;
1994 continue;
1995 }
1996 err = devlink_nl_linecard_fill(msg, devlink, linecard,
1997 DEVLINK_CMD_LINECARD_NEW,
1998 NETLINK_CB(cb->skb).portid,
1999 cb->nlh->nlmsg_seq,
2000 NLM_F_MULTI,
2001 cb->extack);
2002 if (err) {
2003 mutex_unlock(&devlink->lock);
2004 goto out;
2005 }
2006 idx++;
2007 }
2008 mutex_unlock(&devlink->lock);
2009 }
2010 out:
2011 mutex_unlock(&devlink_mutex);
2012
2013 cb->args[0] = idx;
2014 return msg->len;
2015 }
2016
---
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" (55060 bytes)
Powered by blists - more mailing lists