[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202501111916.yahwykQO-lkp@intel.com>
Date: Sat, 11 Jan 2025 19:51:41 +0800
From: kernel test robot <lkp@...el.com>
To: Stephen Boyd <sboyd@...nel.org>,
Michael Turquette <mturquette@...libre.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH 4/4] clk: Make debugfs code into a loadable kernel module
Hi Stephen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on fac04efc5c793dccbd07e2d59af9f90b7fc0dca4]
url: https://github.com/intel-lab-lkp/linux/commits/Stephen-Boyd/clk-Prepare-clk_debug_create_one-to-be-split-off/20250108-085933
base: fac04efc5c793dccbd07e2d59af9f90b7fc0dca4
patch link: https://lore.kernel.org/r/20250108005854.2973184-5-sboyd%40kernel.org
patch subject: [PATCH 4/4] clk: Make debugfs code into a loadable kernel module
config: loongarch-randconfig-r054-20250111 (https://download.01.org/0day-ci/archive/20250111/202501111916.yahwykQO-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501111916.yahwykQO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501111916.yahwykQO-lkp@intel.com/
All warnings (new ones prefixed by >>):
from include/linux/kernel.h:22,
from include/linux/clk.h:13,
from drivers/clk/clk.c:9:
drivers/clk/clk.c: In function 'clk_hw_debug_for_each_init':
include/linux/container_of.h:20:54: error: 'struct clk_core' has no member named 'debug_node'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:483:27: error: expression in static assertion is not an integer
483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/loongarch/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:324,
from include/linux/err.h:5,
from include/linux/clk.h:12:
include/linux/stddef.h:16:33: error: 'struct clk_core' has no member named 'debug_node'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/linux/container_of.h:23:28: note: in expansion of macro 'offsetof'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/mutex.h:15,
from include/linux/notifier.h:14,
from include/linux/clk.h:14:
include/linux/list.h:1157:42: error: 'struct clk_core' has no member named 'debug_node'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~
include/linux/list.h:1144:19: note: in definition of macro 'hlist_entry_safe'
1144 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/list.h:1157:42: error: 'struct clk_core' has no member named 'debug_node'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~
include/linux/list.h:1144:35: note: in definition of macro 'hlist_entry_safe'
1144 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
>> include/linux/container_of.h:19:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
19 | void *__mptr = (void *)(ptr); \
| ^
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:35: error: invalid type argument of unary '*' (have 'int')
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:54: error: 'struct clk_core' has no member named 'debug_node'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:21:35: error: invalid type argument of unary '*' (have 'int')
21 | __same_type(*(ptr), void), \
| ^~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
21 | __same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:483:27: error: expression in static assertion is not an integer
483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
--
include/linux/container_of.h:23:28: note: in expansion of macro 'offsetof'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3562:9: note: in expansion of macro 'hlist_for_each_entry'
3562 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
drivers/clk/clk.c: In function 'clk_hw_debug_exit':
include/linux/container_of.h:20:54: error: 'struct clk_core' has no member named 'debug_node'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:483:27: error: expression in static assertion is not an integer
483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/stddef.h:16:33: error: 'struct clk_core' has no member named 'debug_node'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/linux/container_of.h:23:28: note: in expansion of macro 'offsetof'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1155:20: note: in expansion of macro 'hlist_entry_safe'
1155 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/list.h:1157:42: error: 'struct clk_core' has no member named 'debug_node'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~
include/linux/list.h:1144:19: note: in definition of macro 'hlist_entry_safe'
1144 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/list.h:1157:42: error: 'struct clk_core' has no member named 'debug_node'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~
include/linux/list.h:1144:35: note: in definition of macro 'hlist_entry_safe'
1144 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
>> include/linux/container_of.h:19:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
19 | void *__mptr = (void *)(ptr); \
| ^
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:35: error: invalid type argument of unary '*' (have 'int')
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:54: error: 'struct clk_core' has no member named 'debug_node'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:21:35: error: invalid type argument of unary '*' (have 'int')
21 | __same_type(*(ptr), void), \
| ^~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
21 | __same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:1145:22: note: in expansion of macro 'hlist_entry'
1145 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/list.h:1157:20: note: in expansion of macro 'hlist_entry_safe'
1157 | pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
| ^~~~~~~~~~~~~~~~
drivers/clk/clk.c:3574:9: note: in expansion of macro 'hlist_for_each_entry'
3574 | hlist_for_each_entry(core, &clk_debug_list, debug_node)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:483:27: error: expression in static assertion is not an integer
483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:1134:40: note: in expansion of macro 'container_of'
1134 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
vim +19 include/linux/container_of.h
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 9
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 10 /**
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 11 * container_of - cast a member of a structure out to the containing structure
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 12 * @ptr: the pointer to the member.
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 13 * @type: the type of the container struct this is embedded in.
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 14 * @member: the name of the member within the struct.
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 15 *
7376e561fd2e01 Sakari Ailus 2022-10-24 16 * WARNING: any const qualifier of @ptr is lost.
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 17 */
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 18 #define container_of(ptr, type, member) ({ \
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 @19 void *__mptr = (void *)(ptr); \
e1edc277e6f6df Rasmus Villemoes 2021-11-08 20 static_assert(__same_type(*(ptr), ((type *)0)->member) || \
e1edc277e6f6df Rasmus Villemoes 2021-11-08 21 __same_type(*(ptr), void), \
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 22 "pointer type mismatch in container_of()"); \
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 23 ((type *)(__mptr - offsetof(type, member))); })
d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 24
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists