From patchwork Fri Aug 19 14:24:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Cousson X-Patchwork-Id: 1080492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7JEOE1J007545 for ; Fri, 19 Aug 2011 14:24:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754737Ab1HSOYN (ORCPT ); Fri, 19 Aug 2011 10:24:13 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:38150 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754167Ab1HSOYM (ORCPT ); Fri, 19 Aug 2011 10:24:12 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7JEO3lS012760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Aug 2011 09:24:03 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JEO3RY019321; Fri, 19 Aug 2011 09:24:03 -0500 (CDT) Received: from DFLE71.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JEO33X004725; Fri, 19 Aug 2011 09:24:03 -0500 (CDT) Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle71.ent.ti.com (128.247.5.62) with Microsoft SMTP Server id 14.1.323.3; Fri, 19 Aug 2011 09:24:03 -0500 Received: from [137.167.125.104] (cnc0919096.emea.dhcp.ti.com [137.167.125.104]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JEO1jL031412; Fri, 19 Aug 2011 09:24:01 -0500 Message-ID: <4E4E7200.6080202@ti.com> Date: Fri, 19 Aug 2011 16:24:00 +0200 From: "Cousson, Benoit" Organization: Texas Instruments User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Grant Likely , "devicetree-discuss@lists.ozlabs.org" CC: linux-omap , "Balbi, Felipe" , "Nayak, Rajendra" , "G, Manjunath Kondaiah" Subject: [RFC] OMAP3+: boards: Fix the __initconst build error for devicetree/test branch Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 19 Aug 2011 14:24:14 +0000 (UTC) Hi Grant, The current devicetree/test branch is broken due to the introduction of the __initconst for dt_compat table. My original basic fix is the following one, but Felipe figured out the root cause. So it can be fixed by adding an extra const to make the whole table const: - const char **dt_compat; /* array of device tree + const char * const *dt_compat; /* array of device tree That fix will require fixing all the current users of dt_compat with something like that: -static const char *omap3_beagle_dt_match[] __initconst = { +static const char * const omap3_beagle_dt_match[] __initconst = { A couple of of_XXX APIs will have to updated as well, that's why I was wondering if you wanted to go that way. Any thought? Regards, Benoit --- From fcee9dbfeb44dc5c5b79f002e63be6e00d8f82b6 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Mon, 8 Aug 2011 11:30:45 +0200 Subject: [PATCH] OMAP3+: boards: Fix the __initconst build error The __initconst introduced some build errors with the following compiler version: arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1 arch/arm/mach-omap2/board-omap3beagle.c:566:20: error: omap3_beagle_dt_match causes a section type conflict Replace them by __initdata. Signed-off-by: Benoit Cousson --- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap4panda.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 249165a..2521823 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -671,7 +671,7 @@ static void __init igep_init(void) } } -static const char *igep2_dt_compat[] __initconst = { +static const char *igep2_dt_compat[] __initdata = { "ISEE,igep-v2", NULL }; diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index b3b9cbc..a7923ca 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -563,7 +563,7 @@ static void __init omap3_beagle_init(void) beagle_opp_init(); } -static const char *omap3_beagle_dt_match[] __initconst = { +static const char *omap3_beagle_dt_match[] __initdata = { "ti,omap3-beagle", NULL }; diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index b526aa9..1c583c7 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -581,7 +581,7 @@ static void __init omap4_panda_map_io(void) omap44xx_map_common_io(); } -static const char *omap4_panda_match[] __initconst = { +static const char *omap4_panda_match[] __initdata = { "ti,omap4-panda", NULL, }; diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 18ae2c2..f0b8489 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -560,7 +560,7 @@ static void __init overo_init(void) "OVERO_GPIO_USBH_CPEN\n"); } -static const char *omap3_overo_dt_match[] __initconst = { +static const char *omap3_overo_dt_match[] __initdata = { "gumstix,omap3-overo", NULL };