From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752554AbcIBMMc (ORCPT ); Fri, 2 Sep 2016 08:12:32 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53792 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbcIBMMb (ORCPT ); Fri, 2 Sep 2016 08:12:31 -0400 Date: Fri, 2 Sep 2016 14:10:08 +0200 (CEST) From: Thomas Gleixner To: Sebastian Andrzej Siewior cc: kbuild test robot , 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 In-Reply-To: <20160902105103.dlt3hf7jvehcacqq@linutronix.de> Message-ID: References: <201609021728.k79GQM6N%fengguang.wu@intel.com> <20160902105103.dlt3hf7jvehcacqq@linutronix.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1283955556-1472818208=:5647" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1283955556-1472818208=:5647 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT 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].') > > >> 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].') > > 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 --8323329-1283955556-1472818208=:5647--