Re: include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'

From: Daniel Lezcano
Date: Mon Sep 25 2017 - 12:38:05 EST


On 25/09/2017 17:15, Ian Abbott wrote:
> [Sorry for the repost. 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:ÂÂ
>> 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;

[ ... ]

>
> 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.

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 â 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