* include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
@ 2017-07-23 4:56 kbuild test robot
2017-07-24 10:31 ` Ian Abbott
0 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2017-07-23 4:56 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5234 bytes --]
Hi Ian,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 96080f697786e0a30006fcbcc5b53f350fcb3e9f
commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
date: 10 days ago
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from drivers/clocksource/timer-of.c:25:0:
drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/clocksource/timer-of.c:18:
drivers/clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
--
In file included from drivers//clocksource/timer-of.c:25:0:
drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers//clocksource/timer-of.c:18:
drivers//clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
vim +860 include/linux/kernel.h
843
844
845 /*
846 * swap - swap value of @a and @b
847 */
848 #define swap(a, b) \
849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
850
851 /**
852 * container_of - cast a member of a structure out to the containing structure
853 * @ptr: the pointer to the member.
854 * @type: the type of the container struct this is embedded in.
855 * @member: the name of the member within the struct.
856 *
857 */
858 #define container_of(ptr, type, member) ({ \
859 void *__mptr = (void *)(ptr); \
> 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
861 !__same_type(*(ptr), void), \
862 "pointer type mismatch in container_of()"); \
863 ((type *)(__mptr - offsetof(type, member))); })
864
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48298 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-07-23 4:56 include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device' kbuild test robot
@ 2017-07-24 10:31 ` Ian Abbott
0 siblings, 0 replies; 12+ messages in thread
From: Ian Abbott @ 2017-07-24 10:31 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List, Matt Redfearn
On 23/07/17 05:56, kbuild test robot wrote:
> Hi Ian,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 96080f697786e0a30006fcbcc5b53f350fcb3e9f
> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
> date: 10 days ago
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 6.2.0
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
> # save the attached .config to linux build tree
> make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/clocksource/timer-of.c:25:0:
> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers/clocksource/timer-of.c:18:
> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
> --
> In file included from drivers//clocksource/timer-of.c:25:0:
> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers//clocksource/timer-of.c:18:
> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
>
> vim +860 include/linux/kernel.h
>
> 843
> 844
> 845 /*
> 846 * swap - swap value of @a and @b
> 847 */
> 848 #define swap(a, b) \
> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
> 850
> 851 /**
> 852 * container_of - cast a member of a structure out to the containing structure
> 853 * @ptr: the pointer to the member.
> 854 * @type: the type of the container struct this is embedded in.
> 855 * @member: the name of the member within the struct.
> 856 *
> 857 */
> 858 #define container_of(ptr, type, member) ({ \
> 859 void *__mptr = (void *)(ptr); \
> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> 861 !__same_type(*(ptr), void), \
> 862 "pointer type mismatch in container_of()"); \
> 863 ((type *)(__mptr - offsetof(type, member))); })
> 864
Matt Redfearn sent a fix 6 days ago. It didn't get Cc'ed to LKML, but
it did get Cc'd to the CLOCKSOURCE maintainers. Does it need re-posting?
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-09-25 15:15 ` Ian Abbott
@ 2017-09-25 16:37 ` Daniel Lezcano
0 siblings, 0 replies; 12+ messages in thread
From: Daniel Lezcano @ 2017-09-25 16:37 UTC (permalink / raw)
To: Ian Abbott, kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List, Thomas Gleixner
On 25/09/2017 17:15, Ian Abbott wrote:
> [Sorry for the repost.A I forgot to Cc the people I said I was Cc'ing!]
Hi Ian,
[ ... ]
> On 24/09/17 09:26, kbuild test robot wrote:
>> Hi Ian,
>>
>> FYI, the error/warning still remains.
>>
>> tree:A A
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:A A cd4175b11685b11c40e31a03e05084cc212b0649
>> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle
>> pointers to arrays better in container_of()
>> date:A A 2 months ago
>> config: ia64-allmodconfig (attached as .config)
>> compiler: ia64-linux-gcc (GCC) 6.2.0
>> reproduce:
>> A A A A A A A A wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> A A A A A A A A chmod +x ~/bin/make.cross
>> A A A A A A A A git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
>> A A A A A A A A # save the attached .config to linux build tree
>> A A A A A A A A make.cross ARCH=ia64
>>
>> All errors (new ones prefixed by >>):
>>
>> A A A In file included from drivers/clocksource/timer-of.c:25:0:
>> A A A drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has
>> incomplete type
>> A A A A A struct clock_event_device clkevt;
[ ... ]
>
> Cc'ing Daniel Lezcano and Thomas Gleixner, since this seems to be a
> problem with configurations selecting 'TIMER_OF' even though
> 'GENERIC_CLOCKEVENTS' is not selected.
>
> There was a recent-ish commit 599dc457c79b
> ("clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies") to
> address this problem for one particular clocksource driver, but some
> other clocksource drivers seem to share the same problem.A There are
> several clocksource config options in "drivers/clocksource/Kconfig" that
> select 'TIMER_OF' without depending on 'GENERIC_CLOCKEVENTS'.A Some of
> them are only manually selectable when 'COMPILE_TEST' is selected.A This
> particular failure seems to be at least partly due to 'ARMV7M_SYSTICK'
> getting selected.
Thanks for Cc'ing. This issue is currently in the way to be fixed.
https://patchwork.kernel.org/patch/9939191/
-- Daniel
--
<http://www.linaro.org/> Linaro.org a?? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-09-24 8:26 kbuild test robot
2017-09-25 15:06 ` Ian Abbott
@ 2017-09-25 15:15 ` Ian Abbott
2017-09-25 16:37 ` Daniel Lezcano
1 sibling, 1 reply; 12+ messages in thread
From: Ian Abbott @ 2017-09-25 15:15 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List, Daniel Lezcano, Thomas Gleixner
[Sorry for the repost. I forgot to Cc the people I said I was Cc'ing!]
On 24/09/17 09:26, kbuild test robot wrote:
> Hi Ian,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: cd4175b11685b11c40e31a03e05084cc212b0649
> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
> date: 2 months ago
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 6.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
> # save the attached .config to linux build tree
> make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/clocksource/timer-of.c:25:0:
> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
That's the first compile error - 'struct clock_event_device' is
incomplete because 'CONFIG_GENERIC_CLOCKEVENTS' is not defined.
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers/clocksource/timer-of.c:18:
> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
> --
> In file included from drivers//clocksource/timer-of.c:25:0:
> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers//clocksource/timer-of.c:18:
> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
>
> vim +860 include/linux/kernel.h
>
> 843
> 844
> 845 /*
> 846 * swap - swap value of @a and @b
> 847 */
> 848 #define swap(a, b) \
> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
> 850
> 851 /**
> 852 * container_of - cast a member of a structure out to the containing structure
> 853 * @ptr: the pointer to the member.
> 854 * @type: the type of the container struct this is embedded in.
> 855 * @member: the name of the member within the struct.
> 856 *
> 857 */
> 858 #define container_of(ptr, type, member) ({ \
> 859 void *__mptr = (void *)(ptr); \
> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> 861 !__same_type(*(ptr), void), \
> 862 "pointer type mismatch in container_of()"); \
> 863 ((type *)(__mptr - offsetof(type, member))); })
> 864
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
Cc'ing Daniel Lezcano and Thomas Gleixner, since this seems to be a
problem with configurations selecting 'TIMER_OF' even though
'GENERIC_CLOCKEVENTS' is not selected.
There was a recent-ish commit 599dc457c79b
("clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies") to
address this problem for one particular clocksource driver, but some
other clocksource drivers seem to share the same problem. There are
several clocksource config options in "drivers/clocksource/Kconfig" that
select 'TIMER_OF' without depending on 'GENERIC_CLOCKEVENTS'. Some of
them are only manually selectable when 'COMPILE_TEST' is selected. This
particular failure seems to be at least partly due to 'ARMV7M_SYSTICK'
getting selected.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-09-24 8:26 kbuild test robot
@ 2017-09-25 15:06 ` Ian Abbott
2017-09-25 15:15 ` Ian Abbott
1 sibling, 0 replies; 12+ messages in thread
From: Ian Abbott @ 2017-09-25 15:06 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
On 24/09/17 09:26, kbuild test robot wrote:
> Hi Ian,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: cd4175b11685b11c40e31a03e05084cc212b0649
> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
> date: 2 months ago
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 6.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
> # save the attached .config to linux build tree
> make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/clocksource/timer-of.c:25:0:
> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
That's the first compile error - 'struct clock_event_device' is
incomplete because 'CONFIG_GENERIC_CLOCKEVENTS' is not defined.
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers/clocksource/timer-of.c:18:
> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
> --
> In file included from drivers//clocksource/timer-of.c:25:0:
> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers//clocksource/timer-of.c:18:
> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
>
> vim +860 include/linux/kernel.h
>
> 843
> 844
> 845 /*
> 846 * swap - swap value of @a and @b
> 847 */
> 848 #define swap(a, b) \
> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
> 850
> 851 /**
> 852 * container_of - cast a member of a structure out to the containing structure
> 853 * @ptr: the pointer to the member.
> 854 * @type: the type of the container struct this is embedded in.
> 855 * @member: the name of the member within the struct.
> 856 *
> 857 */
> 858 #define container_of(ptr, type, member) ({ \
> 859 void *__mptr = (void *)(ptr); \
> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> 861 !__same_type(*(ptr), void), \
> 862 "pointer type mismatch in container_of()"); \
> 863 ((type *)(__mptr - offsetof(type, member))); })
> 864
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
Cc'ing Daniel Lezcano and Thomas Gleixner, since this seems to be a
problem with configurations selecting 'TIMER_OF' even though
'GENERIC_CLOCKEVENTS' is not selected.
There was a recent-ish commit 599dc457c79b
("clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies") to
address this problem for one particular clocksource driver, but some
other clocksource drivers seem to share the same problem. There are
several clocksource config options in "drivers/clocksource/Kconfig" that
select 'TIMER_OF' without depending on 'GENERIC_CLOCKEVENTS'. Some of
them are only manually selectable when 'COMPILE_TEST' is selected. This
particular failure seems to be at least partly due to 'ARMV7M_SYSTICK'
getting selected.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
@ 2017-09-24 8:26 kbuild test robot
2017-09-25 15:06 ` Ian Abbott
2017-09-25 15:15 ` Ian Abbott
0 siblings, 2 replies; 12+ messages in thread
From: kbuild test robot @ 2017-09-24 8:26 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5235 bytes --]
Hi Ian,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd4175b11685b11c40e31a03e05084cc212b0649
commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
date: 2 months ago
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from drivers/clocksource/timer-of.c:25:0:
drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/clocksource/timer-of.c:18:
drivers/clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
--
In file included from drivers//clocksource/timer-of.c:25:0:
drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers//clocksource/timer-of.c:18:
drivers//clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
vim +860 include/linux/kernel.h
843
844
845 /*
846 * swap - swap value of @a and @b
847 */
848 #define swap(a, b) \
849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
850
851 /**
852 * container_of - cast a member of a structure out to the containing structure
853 * @ptr: the pointer to the member.
854 * @type: the type of the container struct this is embedded in.
855 * @member: the name of the member within the struct.
856 *
857 */
858 #define container_of(ptr, type, member) ({ \
859 void *__mptr = (void *)(ptr); \
> 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
861 !__same_type(*(ptr), void), \
862 "pointer type mismatch in container_of()"); \
863 ((type *)(__mptr - offsetof(type, member))); })
864
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47790 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
@ 2017-08-06 5:13 kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2017-08-06 5:13 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5234 bytes --]
Hi Ian,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0fdd951c9bef93637d5af036851e7a5632fbd6c3
commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
date: 3 weeks ago
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from drivers//clocksource/timer-of.c:25:0:
drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers//clocksource/timer-of.c:18:
drivers//clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
--
In file included from drivers/clocksource/timer-of.c:25:0:
drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/clocksource/timer-of.c:18:
drivers/clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
vim +860 include/linux/kernel.h
843
844
845 /*
846 * swap - swap value of @a and @b
847 */
848 #define swap(a, b) \
849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
850
851 /**
852 * container_of - cast a member of a structure out to the containing structure
853 * @ptr: the pointer to the member.
854 * @type: the type of the container struct this is embedded in.
855 * @member: the name of the member within the struct.
856 *
857 */
858 #define container_of(ptr, type, member) ({ \
859 void *__mptr = (void *)(ptr); \
> 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
861 !__same_type(*(ptr), void), \
862 "pointer type mismatch in container_of()"); \
863 ((type *)(__mptr - offsetof(type, member))); })
864
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51382 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
@ 2017-07-30 14:07 kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2017-07-30 14:07 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 3484 bytes --]
Hi Ian,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0a07b238e5f488b459b6113a62e06b6aab017f71
commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
date: 3 weeks ago
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from drivers/clocksource/timer-of.c:25:0:
drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/clocksource/timer-of.c:18:
drivers/clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
vim +860 include/linux/kernel.h
843
844
845 /*
846 * swap - swap value of @a and @b
847 */
848 #define swap(a, b) \
849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
850
851 /**
852 * container_of - cast a member of a structure out to the containing structure
853 * @ptr: the pointer to the member.
854 * @type: the type of the container struct this is embedded in.
855 * @member: the name of the member within the struct.
856 *
857 */
858 #define container_of(ptr, type, member) ({ \
859 void *__mptr = (void *)(ptr); \
> 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
861 !__same_type(*(ptr), void), \
862 "pointer type mismatch in container_of()"); \
863 ((type *)(__mptr - offsetof(type, member))); })
864
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51399 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-07-16 14:14 ` Ian Abbott
@ 2017-07-16 14:23 ` Ian Abbott
0 siblings, 0 replies; 12+ messages in thread
From: Ian Abbott @ 2017-07-16 14:23 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List, linux-mips
On 16/07/17 15:14, Ian Abbott wrote:
> On 16/07/17 14:50, Ian Abbott wrote:
>> On 16/07/17 04:24, kbuild test robot wrote:
>>> tree:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> master
>>> head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
>>> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle
>>> pointers to arrays better in container_of()
>>> date: 3 days ago
>>> config: ia64-allyesconfig (attached as .config)
>>> compiler: ia64-linux-gcc (GCC) 6.2.0
>>> reproduce:
>>> wget
>>> https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross
>>> -O ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
>>> # save the attached .config to linux build tree
>>> make.cross ARCH=ia64
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>> In file included from drivers/clocksource/timer-of.c:25:0:
>>> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has
>>> incomplete type
>>> struct clock_event_device clkevt;
>>> ^~~~~~
>>> In file included from include/linux/err.h:4:0,
>>> from include/linux/clk.h:15,
>>> from drivers/clocksource/timer-of.c:18:
>>> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>>>> include/linux/kernel.h:860:32: error: dereferencing pointer to
>>>>> incomplete type 'struct clock_event_device'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~
>>> include/linux/compiler.h:517:19: note: in definition of macro
>>> '__compiletime_assert'
>>> bool __cond = !(condition); \
>>> ^~~~~~~~~
>>> include/linux/compiler.h:537:2: note: in expansion of macro
>>> '_compiletime_assert'
>>> _compiletime_assert(condition, msg, __compiletime_assert_,
>>> __LINE__)
>>> ^~~~~~~~~~~~~~~~~~~
>>> include/linux/build_bug.h:46:37: note: in expansion of macro
>>> 'compiletime_assert'
>>> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>>> ^~~~~~~~~~~~~~~~~~
>>> include/linux/kernel.h:860:2: note: in expansion of macro
>>> 'BUILD_BUG_ON_MSG'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~~~~~~~~~~~
>>> include/linux/kernel.h:860:20: note: in expansion of macro
>>> '__same_type'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~~~~~~
>>> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro
>>> 'container_of'
>>> return container_of(clkevt, struct timer_of, clkevt);
>>> ^~~~~~~~~~~~
>>> --
>>> In file included from drivers//clocksource/timer-of.c:25:0:
>>> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has
>>> incomplete type
>>> struct clock_event_device clkevt;
>>> ^~~~~~
>>> In file included from include/linux/err.h:4:0,
>>> from include/linux/clk.h:15,
>>> from drivers//clocksource/timer-of.c:18:
>>> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>>>> include/linux/kernel.h:860:32: error: dereferencing pointer to
>>>>> incomplete type 'struct clock_event_device'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~
>>> include/linux/compiler.h:517:19: note: in definition of macro
>>> '__compiletime_assert'
>>> bool __cond = !(condition); \
>>> ^~~~~~~~~
>>> include/linux/compiler.h:537:2: note: in expansion of macro
>>> '_compiletime_assert'
>>> _compiletime_assert(condition, msg, __compiletime_assert_,
>>> __LINE__)
>>> ^~~~~~~~~~~~~~~~~~~
>>> include/linux/build_bug.h:46:37: note: in expansion of macro
>>> 'compiletime_assert'
>>> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>>> ^~~~~~~~~~~~~~~~~~
>>> include/linux/kernel.h:860:2: note: in expansion of macro
>>> 'BUILD_BUG_ON_MSG'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~~~~~~~~~~~
>>> include/linux/kernel.h:860:20: note: in expansion of macro
>>> '__same_type'
>>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>>> ^~~~~~~~~~~
>>> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro
>>> 'container_of'
>>> return container_of(clkevt, struct timer_of, clkevt);
>>> ^~~~~~~~~~~~
>>>
>>> vim +860 include/linux/kernel.h
>>>
>>> 843
>>> 844
>>> 845 /*
>>> 846 * swap - swap value of @a and @b
>>> 847 */
>>> 848 #define swap(a, b) \
>>> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; }
>>> while (0)
>>> 850
>>> 851 /**
>>> 852 * container_of - cast a member of a structure out to the
>>> containing structure
>>> 853 * @ptr: the pointer to the member.
>>> 854 * @type: the type of the container struct this is
>>> embedded in.
>>> 855 * @member: the name of the member within the struct.
>>> 856 *
>>> 857 */
>>> 858 #define container_of(ptr, type, member) ({ \
>>> 859 void *__mptr = (void *)(ptr); \
>>> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type
>>> *)0)->member) && \
>>> 861 !__same_type(*(ptr), void), \
>>> 862 "pointer type mismatch in container_of()"); \
>>> 863 ((type *)(__mptr - offsetof(type, member))); })
>>> 864
>>>
>>> ---
>>> 0-DAY kernel test infrastructure Open Source
>>> Technology Center
>>> https://lists.01.org/pipermail/kbuild-all Intel
>>> Corporation
>>>
>>
>> struct clock_event_device is only completely defined when
>> CONFIG_GENERIC_CLOCKEVENTS is defined, which it isn't. But I'm
>> confused as to why TIMER_OF getting selected by allyesconfig since it
>> depends on GENERIC_CLOCKEVENTS.
>>
>
> It seems to be due to CLKSRC_PISTACHIO being selected, I guess that
> should also depend on GENERIC_CLOCKEVENTS.
>
Cc'ing linux-mips@linux-mips.org.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-07-16 13:50 ` Ian Abbott
@ 2017-07-16 14:14 ` Ian Abbott
2017-07-16 14:23 ` Ian Abbott
0 siblings, 1 reply; 12+ messages in thread
From: Ian Abbott @ 2017-07-16 14:14 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
On 16/07/17 14:50, Ian Abbott wrote:
> On 16/07/17 04:24, kbuild test robot wrote:
>> tree:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
>> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle
>> pointers to arrays better in container_of()
>> date: 3 days ago
>> config: ia64-allyesconfig (attached as .config)
>> compiler: ia64-linux-gcc (GCC) 6.2.0
>> reproduce:
>> wget
>> https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
>> # save the attached .config to linux build tree
>> make.cross ARCH=ia64
>>
>> All errors (new ones prefixed by >>):
>>
>> In file included from drivers/clocksource/timer-of.c:25:0:
>> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has
>> incomplete type
>> struct clock_event_device clkevt;
>> ^~~~~~
>> In file included from include/linux/err.h:4:0,
>> from include/linux/clk.h:15,
>> from drivers/clocksource/timer-of.c:18:
>> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>>> include/linux/kernel.h:860:32: error: dereferencing pointer to
>>>> incomplete type 'struct clock_event_device'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~
>> include/linux/compiler.h:517:19: note: in definition of macro
>> '__compiletime_assert'
>> bool __cond = !(condition); \
>> ^~~~~~~~~
>> include/linux/compiler.h:537:2: note: in expansion of macro
>> '_compiletime_assert'
>> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>> ^~~~~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:46:37: note: in expansion of macro
>> 'compiletime_assert'
>> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>> ^~~~~~~~~~~~~~~~~~
>> include/linux/kernel.h:860:2: note: in expansion of macro
>> 'BUILD_BUG_ON_MSG'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~~~~~~~~~~~
>> include/linux/kernel.h:860:20: note: in expansion of macro
>> '__same_type'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~~~~~~
>> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro
>> 'container_of'
>> return container_of(clkevt, struct timer_of, clkevt);
>> ^~~~~~~~~~~~
>> --
>> In file included from drivers//clocksource/timer-of.c:25:0:
>> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has
>> incomplete type
>> struct clock_event_device clkevt;
>> ^~~~~~
>> In file included from include/linux/err.h:4:0,
>> from include/linux/clk.h:15,
>> from drivers//clocksource/timer-of.c:18:
>> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>>> include/linux/kernel.h:860:32: error: dereferencing pointer to
>>>> incomplete type 'struct clock_event_device'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~
>> include/linux/compiler.h:517:19: note: in definition of macro
>> '__compiletime_assert'
>> bool __cond = !(condition); \
>> ^~~~~~~~~
>> include/linux/compiler.h:537:2: note: in expansion of macro
>> '_compiletime_assert'
>> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>> ^~~~~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:46:37: note: in expansion of macro
>> 'compiletime_assert'
>> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>> ^~~~~~~~~~~~~~~~~~
>> include/linux/kernel.h:860:2: note: in expansion of macro
>> 'BUILD_BUG_ON_MSG'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~~~~~~~~~~~
>> include/linux/kernel.h:860:20: note: in expansion of macro
>> '__same_type'
>> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
>> ^~~~~~~~~~~
>> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro
>> 'container_of'
>> return container_of(clkevt, struct timer_of, clkevt);
>> ^~~~~~~~~~~~
>>
>> vim +860 include/linux/kernel.h
>>
>> 843
>> 844
>> 845 /*
>> 846 * swap - swap value of @a and @b
>> 847 */
>> 848 #define swap(a, b) \
>> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; }
>> while (0)
>> 850
>> 851 /**
>> 852 * container_of - cast a member of a structure out to the
>> containing structure
>> 853 * @ptr: the pointer to the member.
>> 854 * @type: the type of the container struct this is
>> embedded in.
>> 855 * @member: the name of the member within the struct.
>> 856 *
>> 857 */
>> 858 #define container_of(ptr, type, member) ({ \
>> 859 void *__mptr = (void *)(ptr); \
>> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type
>> *)0)->member) && \
>> 861 !__same_type(*(ptr), void), \
>> 862 "pointer type mismatch in container_of()"); \
>> 863 ((type *)(__mptr - offsetof(type, member))); })
>> 864
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology
>> Center
>> https://lists.01.org/pipermail/kbuild-all Intel
>> Corporation
>>
>
> struct clock_event_device is only completely defined when
> CONFIG_GENERIC_CLOCKEVENTS is defined, which it isn't. But I'm confused
> as to why TIMER_OF getting selected by allyesconfig since it depends on
> GENERIC_CLOCKEVENTS.
>
It seems to be due to CLKSRC_PISTACHIO being selected, I guess that
should also depend on GENERIC_CLOCKEVENTS.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
2017-07-16 3:24 kbuild test robot
@ 2017-07-16 13:50 ` Ian Abbott
2017-07-16 14:14 ` Ian Abbott
0 siblings, 1 reply; 12+ messages in thread
From: Ian Abbott @ 2017-07-16 13:50 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
On 16/07/17 04:24, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
> commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
> date: 3 days ago
> config: ia64-allyesconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 6.2.0
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
> # save the attached .config to linux build tree
> make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/clocksource/timer-of.c:25:0:
> drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers/clocksource/timer-of.c:18:
> drivers/clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
> --
> In file included from drivers//clocksource/timer-of.c:25:0:
> drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
> struct clock_event_device clkevt;
> ^~~~~~
> In file included from include/linux/err.h:4:0,
> from include/linux/clk.h:15,
> from drivers//clocksource/timer-of.c:18:
> drivers//clocksource/timer-of.h: In function 'to_timer_of':
>>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~
> include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
> bool __cond = !(condition); \
> ^~~~~~~~~
> include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~~~~~~
> include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
> BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> ^~~~~~~~~~~
> drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
> return container_of(clkevt, struct timer_of, clkevt);
> ^~~~~~~~~~~~
>
> vim +860 include/linux/kernel.h
>
> 843
> 844
> 845 /*
> 846 * swap - swap value of @a and @b
> 847 */
> 848 #define swap(a, b) \
> 849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
> 850
> 851 /**
> 852 * container_of - cast a member of a structure out to the containing structure
> 853 * @ptr: the pointer to the member.
> 854 * @type: the type of the container struct this is embedded in.
> 855 * @member: the name of the member within the struct.
> 856 *
> 857 */
> 858 #define container_of(ptr, type, member) ({ \
> 859 void *__mptr = (void *)(ptr); \
> > 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
> 861 !__same_type(*(ptr), void), \
> 862 "pointer type mismatch in container_of()"); \
> 863 ((type *)(__mptr - offsetof(type, member))); })
> 864
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
struct clock_event_device is only completely defined when
CONFIG_GENERIC_CLOCKEVENTS is defined, which it isn't. But I'm confused
as to why TIMER_OF getting selected by allyesconfig since it depends on
GENERIC_CLOCKEVENTS.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
@ 2017-07-16 3:24 kbuild test robot
2017-07-16 13:50 ` Ian Abbott
0 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2017-07-16 3:24 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, Arnd Bergmann, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5185 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
date: 3 days ago
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7acec713d14c6ce8a20154f9dfda258d6bcad3b
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from drivers/clocksource/timer-of.c:25:0:
drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/clocksource/timer-of.c:18:
drivers/clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
--
In file included from drivers//clocksource/timer-of.c:25:0:
drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
struct clock_event_device clkevt;
^~~~~~
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers//clocksource/timer-of.c:18:
drivers//clocksource/timer-of.h: In function 'to_timer_of':
>> include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:517:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:537:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:860:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers//clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
return container_of(clkevt, struct timer_of, clkevt);
^~~~~~~~~~~~
vim +860 include/linux/kernel.h
843
844
845 /*
846 * swap - swap value of @a and @b
847 */
848 #define swap(a, b) \
849 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
850
851 /**
852 * container_of - cast a member of a structure out to the containing structure
853 * @ptr: the pointer to the member.
854 * @type: the type of the container struct this is embedded in.
855 * @member: the name of the member within the struct.
856 *
857 */
858 #define container_of(ptr, type, member) ({ \
859 void *__mptr = (void *)(ptr); \
> 860 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
861 !__same_type(*(ptr), void), \
862 "pointer type mismatch in container_of()"); \
863 ((type *)(__mptr - offsetof(type, member))); })
864
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51382 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-09-25 16:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-23 4:56 include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device' kbuild test robot
2017-07-24 10:31 ` Ian Abbott
-- strict thread matches above, loose matches on Subject: below --
2017-09-24 8:26 kbuild test robot
2017-09-25 15:06 ` Ian Abbott
2017-09-25 15:15 ` Ian Abbott
2017-09-25 16:37 ` Daniel Lezcano
2017-08-06 5:13 kbuild test robot
2017-07-30 14:07 kbuild test robot
2017-07-16 3:24 kbuild test robot
2017-07-16 13:50 ` Ian Abbott
2017-07-16 14:14 ` Ian Abbott
2017-07-16 14:23 ` Ian Abbott
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).