From patchwork Thu May 26 13:55:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 820912 Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4QDwDRQ025202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 26 May 2011 13:58:36 GMT Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QPb2X-0006p2-94; Thu, 26 May 2011 13:55:53 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QPb2R-0006o3-Se for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2011 13:55:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=AZMf6xZMQYg8/A3iPb78YNlPogTWiMIGfL1WFATxsCs=; b=gxQ/axXxY2z3gt5tug06KLWUDS6NvjSJUc/Kz9RbvCrwQ5b53S/VaeOgKhKaNgtKQEb2jcF2DPf9r3cc731MxFg3oQR9LWukFo3QAEdwfJYr1mL6Ac7GHcetq7CvjjK6zJKPunOW/H7qo+jvp1YxrRxZJXEX2kyJ9jAeUmWWisk=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QPb2F-0003TN-3B; Thu, 26 May 2011 14:55:35 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QPb2D-0001w0-QR; Thu, 26 May 2011 14:55:33 +0100 Date: Thu, 26 May 2011 14:55:33 +0100 From: Russell King - ARM Linux To: Tony Lindgren Subject: Re: [PATCH] ARM: OMAP: Get rid of section mismatch warnings Message-ID: <20110526135533.GA25841@n2100.arm.linux.org.uk> References: <1306414838-4330-1-git-send-email-silesh@ti.com> <4DDE4EEF.8070108@ti.com> <20110526133732.GD11352@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110526133732.GD11352@atomide.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110526_095548_520572_B6F6368D X-CRM114-Status: GOOD ( 24.67 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: linux-omap@vger.kernel.org, Santosh Shilimkar , Silesh C V , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 26 May 2011 13:58:36 +0000 (UTC) On Thu, May 26, 2011 at 06:37:32AM -0700, Tony Lindgren wrote: > * Santosh Shilimkar [110526 05:56]: > > On 5/26/2011 6:30 PM, Silesh C V wrote: > > >Get rid of the following and 8 other similar section mismatch > > >warnings > > > > > I send this [1] patch a month back. It's still not considered > > though even after reminder. > > > > [1] https://patchwork.kernel.org/patch/684831/ > > Applying now into devel-fixes with additional fixes from Silesh. > Updated patch below. I also have this from a while back. There's also some nastyness in twl4030-power.c which requires basically s/__init/__devinit/ to almost the entire file. 8<-------- From: Russell King Fix various section mismatch warnings: WARNING: arch/arm/plat-omap/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_chip_init() The function __devinit omap_gpio_probe() references a function __init omap_gpio_chip_init(). If omap_gpio_chip_init is only used by omap_gpio_probe then annotate omap_gpio_chip_init with a matching annotation. WARNING: arch/arm/mach-omap2/built-in.o(.text+0x423c): Section mismatch in reference from the function pm_dbg_regset_init() to the function .init.text:pm_dbg_init() The function pm_dbg_regset_init() references the function __init pm_dbg_init(). This is often because pm_dbg_regset_init lacks a __init annotation or the annotation of pm_dbg_init is wrong. Signed-off-by: Russell King --- arch/arm/mach-omap2/pm-debug.c | 4 ++-- arch/arm/plat-omap/gpio.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 971d186..3800ee0 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -1629,7 +1629,7 @@ static void omap_gpio_mod_init(struct gpio_bank *bank, int id) } } -static void __init omap_gpio_chip_init(struct gpio_bank *bank) +static void __devinit omap_gpio_chip_init(struct gpio_bank *bank) { int j; static int gpio; diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 125f565..169e930 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir; static int pm_dbg_init_done; -static int __init pm_dbg_init(void); +static int pm_dbg_init(void); enum { DEBUG_FILE_COUNTERS = 0, @@ -595,7 +595,7 @@ static int option_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); -static int __init pm_dbg_init(void) +static int pm_dbg_init(void) { int i; struct dentry *d;