From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbcIBKvP convert rfc822-to-8bit (ORCPT ); Fri, 2 Sep 2016 06:51:15 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53586 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbcIBKvL (ORCPT ); Fri, 2 Sep 2016 06:51:11 -0400 Date: Fri, 2 Sep 2016 12:51:04 +0200 From: Sebastian Andrzej Siewior To: kbuild test robot Cc: Thomas Gleixner , 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 Message-ID: <20160902105103.dlt3hf7jvehcacqq@linutronix.de> References: <201609021728.k79GQM6N%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <201609021728.k79GQM6N%fengguang.wu@intel.com> User-Agent: NeoMutt/ (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Sebastian