From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932430AbbAOWAb (ORCPT ); Thu, 15 Jan 2015 17:00:31 -0500 Received: from down.free-electrons.com ([37.187.137.238]:57635 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932382AbbAOWAW (ORCPT ); Thu, 15 Jan 2015 17:00:22 -0500 From: Alexandre Belloni To: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard , Arnd Bergmann , Boris Brezillon , Bo Shen , Wenyou Yang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 16/17] ARM: at91: mark const init data with __initconst instead of __initdata Date: Thu, 15 Jan 2015 22:58:19 +0100 Message-Id: <1421359100-8930-17-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421359100-8930-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1421359100-8930-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As long as there is no other non-const variable marked __initdata in the same compilation unit it doesn't hurt. If there were one however compilation would fail with error: $variablename causes a section type conflict because a section containing const variables is marked read only and so cannot contain non-const variables. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/at91rm9200.c | 2 +- arch/arm/mach-at91/at91sam9.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 6992cc9ce902..a1d1e63fb405 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -46,7 +46,7 @@ static void __init rm9200_dt_device_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static const char *at91rm9200_dt_board_compat[] __initdata = { +static const char *at91rm9200_dt_board_compat[] __initconst = { "atmel,at91rm9200", NULL }; diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c index 8b890644d6f0..0aeabcf4ddb8 100644 --- a/arch/arm/mach-at91/at91sam9.c +++ b/arch/arm/mach-at91/at91sam9.c @@ -24,7 +24,7 @@ static void __init sam9_dt_device_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static const char *at91_dt_board_compat[] __initdata = { +static const char *at91_dt_board_compat[] __initconst = { "atmel,at91sam9", NULL }; -- 2.1.0