From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756129AbcBIPK7 (ORCPT ); Tue, 9 Feb 2016 10:10:59 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:59203 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbcBIPK6 convert rfc822-to-8bit (ORCPT ); Tue, 9 Feb 2016 10:10:58 -0500 From: Arnd Bergmann To: Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Greg Ungerer , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: ks8695: fix __initdata annotation Date: Tue, 09 Feb 2016 16:10:21 +0100 Message-ID: <3182431.K4Gl4054Gk@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160209113624.GU13664@pengutronix.de> References: <1454941509-2773774-1-git-send-email-arnd@arndb.de> <18237653.x9qPaNvtCU@wuerfel> <20160209113624.GU13664@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Provags-ID: V03:K0:EhqZReJtCK+k2p7H5wG456/r1C8W02KPTpQWTptuY7y9kWooh05 kS2qd9DAeBYBzwbYlyzP6KriOd/Pqw3KqD3woNANakPMvuemM8QFyfZtx39k5ftqOYQ4POV 84qZ+ioPGQwdPKBhPrC2RAg03HEQFSYK5C2Tn/NyWVNqlVTUfXCR3sB53LathzDCkRSlD85 t3AS82MM5j/iFfQwwfULg== X-UI-Out-Filterresults: notjunk:1;V01:K0:Rmirc25zvs4=:6+aJwCJgUSfkq7c+R5VlDD yHi7zoNuFFwlE9AwQzTWiM3gN+i96oh2Y+TSo4k7YpiLCtt2odHetmCiic9qqQ7kP5Y8TPU3v EvWmi0rhc1eFfpggswJfJ/C0ugnyEXEpl+svK+72wlAnpE4u8ZTJIyrgfBELzS+7fpRqfJBdu kJ1q1BZYJxmiP3JIbIBCfCw0fHDwAr2AIAZJbBKyaxfiYjV1r1GdHwJgv+bM86Zvu+eqk3MBM 9c7AP3/1CCjIOh8tkY4XtjJqAOiba1SoBLYdW+ihVaAhd6ZnfHdnCWuchjKlzM24KgOTgP5qF VwZxbuRGdZMi4A6iy39TamKIFdeY5M/5wo6ld3gLx1MAh0TLOuVAhfDrU2QRuKU6WMtJIdYYj rHCpq6DYYI6qKifyDODdqO9+XAOwriaseuSHwFk4n5cKAlXwnWhUC0FnTY2hsV2KgpAaE5UOl Jv8z+djaSR5i8NczZSURoI+op9Gw+XhnQiKZkTqQDKNAhOt0bPfJKXFhZbdG9pkzFKtTNQoAc mp+b9ObmqEm2apakpxbLouqsQg1tWnI3UxjuG1SDAomNSjwOho19qoQlDHRlpquqhjYmNBao/ gJQdpEnG21UZgQ3F/NSfY9pb5CfpUJVcWGaQ5jizNTclA4CdZQ7UIoaYJODfuO2IernOESVg3 TTXzvCJY1a+6GGjhKNwUcUKFjU3W0F6y6K5SzCaIobCIRth50cdX0AaOzhUo9+u1W8y7yIt9E dJzw8gftfhQuvxQL Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 09 February 2016 12:36:24 Uwe Kleine-König wrote: > Having the attribute list after the declarator isn't recommended as > explicit as I remember having read it somewhere in the gcc docs. > > info gcc "Attribute Syntax" > > has: > > An attribute specifier list may appear immediately before a declarator > (other than the first) in a comma-separated list of declarators in a > declaration of more than one identifier using a single list of > specifiers and qualifiers. Such attribute specifiers apply only to the > identifier before whose declarator they appear. For example, in > > __attribute__((noreturn)) void d0 (void), > __attribute__((format(printf, 1, 2))) d1 (const char *, ...), > d2 (void) > > the 'noreturn' attribute applies to all the functions declared; the > 'format' attribute only applies to 'd1'. > > (Funny enough, in the example the attribute specifier list doesn't > appear *immediately* before the declarator d0.) > > This might be interpreted as "usually the attribute specifier list appears > after the declarator". Other than that I cannot find an explict > recommended placement in the docs. The examples in > > info gcc "Variable Attributes" > > always have the attribute list after the declarator. Ok, thanks for the detailed answer, I've fixed it up locally now. I guess I'm applying the patch in arm-soc directly at some point and will use the line you suggested after some more testing: static struct map_desc og_io_desc[] __initdata = { Arnd