mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	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 12:51:04 +0200	[thread overview]
Message-ID: <20160902105103.dlt3hf7jvehcacqq@linutronix.de> (raw)
In-Reply-To: <201609021728.k79GQM6N%fengguang.wu@intel.com>

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

Sebastian

  reply	other threads:[~2016-09-02 10:51 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 [this message]
2016-09-02 12:10   ` Thomas Gleixner

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=20160902105103.dlt3hf7jvehcacqq@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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®