LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [jpirko-mlxsw:linecards 60/118] net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list'
@ 2021-08-17  4:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-17  4:06 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: clang-built-linux, kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 11651 bytes --]

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: powerpc64-randconfig-r016-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # 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=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash net/core/

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

All errors (new ones prefixed by >>):

>> net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list'
           list_for_each_entry(devlink, &devlink_list, list) {
                                         ^
>> net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list'
>> net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list'
>> net/core/devlink.c:1987:2: error: no member named 'list' in 'devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
           ^                                           ~~~~
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^                                    ~~~~~~
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^                             ~~~~~~
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^                       ~~~~~~
   include/linux/kernel.h:498:21: note: expanded from macro 'container_of'
           ((type *)(__mptr - offsetof(type, member))); })
                              ^              ~~~~~~
   include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
   #define offsetof(TYPE, MEMBER)  __compiler_offsetof(TYPE, MEMBER)
                                   ^                         ~~~~~~
   include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
   #define __compiler_offsetof(a, b)       __builtin_offsetof(a, b)
                                           ^                     ~
>> net/core/devlink.c:1987:2: error: assigning to 'struct devlink *' from incompatible type 'void'
           list_for_each_entry(devlink, &devlink_list, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:628:11: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/core/devlink.c:1987:46: error: no member named 'list' in 'struct devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
                               ~~~~~~~                 ^
   include/linux/list.h:629:38: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                                    ~~~        ^
   include/linux/list.h:619:9: note: expanded from macro 'list_entry_is_head'
           (&pos->member == (head))
             ~~~  ^
>> net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list'
           list_for_each_entry(devlink, &devlink_list, list) {
                                         ^
>> net/core/devlink.c:1987:46: error: no member named 'list' in 'struct devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/list.h:630:34: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   include/linux/list.h:555:20: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:494:26: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
                                   ^~~
>> net/core/devlink.c:1987:46: error: no member named 'list' in 'struct devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/list.h:630:34: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   include/linux/list.h:555:20: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:328:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:316:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:308:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> net/core/devlink.c:1987:46: error: no member named 'list' in 'struct devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/list.h:630:34: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   include/linux/list.h:555:20: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:328:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:316:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:308:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> net/core/devlink.c:1987:2: error: no member named 'list' in 'devlink'
           list_for_each_entry(devlink, &devlink_list, list) {
           ^                                           ~~~~
   include/linux/list.h:630:13: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                      ^                    ~~~~~~
   include/linux/list.h:555:2: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ^                                              ~~~~~~
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^                       ~~~~~~
   include/linux/kernel.h:498:21: note: expanded from macro 'container_of'
           ((type *)(__mptr - offsetof(type, member))); })
                              ^              ~~~~~~
   include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
   #define offsetof(TYPE, MEMBER)  __compiler_offsetof(TYPE, MEMBER)
                                   ^                         ~~~~~~
   include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
   #define __compiler_offsetof(a, b)       __builtin_offsetof(a, b)
                                           ^                     ~
>> net/core/devlink.c:1987:2: error: assigning to 'struct devlink *' from incompatible type 'void'
           list_for_each_entry(devlink, &devlink_list, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:630:11: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   12 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HOTPLUG_CPU
   Depends on SMP && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
   Selected by
   - PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE && PM_SLEEP


vim +/devlink_list +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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51551 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-17  4:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17  4:06 [jpirko-mlxsw:linecards 60/118] net/core/devlink.c:1987:32: error: use of undeclared identifier 'devlink_list' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).