mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: kbuild test robot <fengguang.wu@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
Date: Mon, 4 Sep 2017 10:01:54 -0700	[thread overview]
Message-ID: <fa5ffb39-ca49-0bb6-da7f-dee760311470@infradead.org> (raw)
In-Reply-To: <201709031417.wFzVqdT7%fengguang.wu@intel.com>

On 09/02/17 23:28, kbuild test robot wrote:
> Hi Daniel,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   d0d6ab53c9abd7dd1070f43a0455328874127ba8
> commit: dc11bae78529526605c5c45c369c9512fd012093 clocksource/drivers: Add timer-of common init routine
> date:   3 months ago
> config: ia64-allyesconfig (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 dc11bae78529526605c5c45c369c9512fd012093
>         # 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/clk.h:16:0,
>                     from drivers/clocksource/timer-of.c:18:
>    drivers/clocksource/timer-of.h: In function 'to_timer_of':
>    include/linux/kernel.h:854:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      const typeof( ((type *)0)->member ) *__mptr = (ptr); \
>                                                    ^
>    drivers/clocksource/timer-of.h:44:9: note: in expansion of macro 'container_of'
>      return container_of(clkevt, struct timer_of, clkevt);
>             ^~~~~~~~~~~~
>    drivers/clocksource/timer-of.c: In function 'timer_irq_init':
>    drivers/clocksource/timer-of.c:63:8: error: dereferencing pointer to incomplete type 'struct clock_event_device'
>      clkevt->irq = of_irq->irq;
>            ^~
>    cc1: some warnings being treated as errors
> 
> vim +/clkevt +35 drivers/clocksource/timer-of.h
> 
>     32	
>     33	struct timer_of {
>     34		unsigned int flags;
>   > 35		struct clock_event_device clkevt;
>     36		struct of_timer_base of_base;
>     37		struct of_timer_irq  of_irq;
>     38		struct of_timer_clk  of_clk;
>     39		void *private_data;
>     40	};
>     41	
> 
> ---

Summary:

GENERIC_CLOCKEVENTS is not enabled. (ia64)
COMPILE_TEST=y

#
# Clock Source drivers
#
CONFIG_TIMER_OF=y
CONFIG_CLKSRC_MMIO=y
# CONFIG_CLKSRC_PISTACHIO is not set
CONFIG_ARMV7M_SYSTICK=y
# CONFIG_ATMEL_PIT is not set
CONFIG_CLKSRC_ST_LPC=y

Both ARMV7M_SYSTICK and CLKSRC_ST_LPC select TIMER_OF (if OF, which is enabled)
and select CLKSRC_MMIO.  TIMER_OF depends on GENERIC_CLOCKEVENTS (=n), but
'select' does not care about that "depends on".

This build error only happens because COMPILE_TEST=y.

Any driver that does 'select TIMER_OF' should also depend on GENERIC_CLOCKEVENTS.
The problem is that some drivers do 'select TIMER_OF if OF', so if OF is not
enabled, then we don't need to depend on GENERIC_CLOCKEVENTS.


"O, what a tangled web we weave when first we practise to deceive!" --Walter Scott

Not that we are trying to deceive in this case -- it's just another Kconfig
tangled web.

Arnd: any ideas?


thanks,
-- 
~Randy

  reply	other threads:[~2017-09-04 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  6:28 kbuild test robot
2017-09-04 17:01 ` Randy Dunlap [this message]
2017-09-05 10:33   ` Arnd Bergmann
2017-09-05 12:43     ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2017-09-24  6:10 kbuild test robot
2017-08-13  7:06 kbuild test robot
2017-08-06  4:11 kbuild test robot
2017-07-30  7:46 kbuild test robot
2017-07-23  3:36 kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa5ffb39-ca49-0bb6-da7f-dee760311470@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=arnd@arndb.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®