mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: kbuild test robot <fengguang.wu@intel.com>,
	kbuild-all@01.org, linux-kernel@vger.kernel.org,
	tipbuild@zytor.com
Subject: Re: [tip:smp/hotplug 4/8] kernel/cpu.c:1252:3: error: unknown field 'startup' specified in initializer
Date: Fri, 2 Sep 2016 14:10:08 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609021409170.5647@nanos> (raw)
In-Reply-To: <20160902105103.dlt3hf7jvehcacqq@linutronix.de>

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

On Fri, 2 Sep 2016, Sebastian Andrzej Siewior wrote:
> On 2016-09-02 17:42:33 [+0800], kbuild test robot wrote:
> > compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
> > 
> > >> kernel/cpu.c:1252:3: error: unknown field 'startup' specified in initializer
> > >> kernel/cpu.c:1252:3: warning: missing braces around initializer
> >    kernel/cpu.c:1252:3: warning: (near initialization for 'cpuhp_bp_states[0].<anonymous>')
> > >> kernel/cpu.c:1253:3: error: unknown field 'teardown' specified in initializer
> >    kernel/cpu.c:1425:3: error: unknown field 'startup' specified in initializer
> >    kernel/cpu.c:1425:3: warning: missing braces around initializer
> >    kernel/cpu.c:1425:3: warning: (near initialization for 'cpuhp_ap_states[121].<anonymous>')
> >    kernel/cpu.c:1426:3: error: unknown field 'teardown' specified in initializer
> 
> This is a compiler issue. We have:
> | struct cpuhp_step {
> |         const char              *name;
> |         union {
> |                 int             (*startup)(unsigned int cpu);
> |                 int             (*startup_multi)(unsigned int cpu,
> |                                                  void *node);
> |         };
> …
> | };
> This unnamed union fields are valid as of ISO C11.
> It seems that gcc 4.5 and earlier can't access ->startup. According to
> [0] this is supported since gcc 4.6.
> 
> [0] https://gcc.gnu.org/wiki/C11Status

And we have anon unions in other places as well. See
include/linux/spinlock_types.h

Thanks

	tglx

      reply	other threads:[~2016-09-02 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  9:42 kbuild test robot
2016-09-02 10:51 ` Sebastian Andrzej Siewior
2016-09-02 12:10   ` Thomas Gleixner [this message]

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=alpine.DEB.2.20.1609021409170.5647@nanos \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tipbuild@zytor.com \
    /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®