From patchwork Fri Oct 7 11:55:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 4568 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 14B8023F59 for ; Fri, 7 Oct 2011 12:00:18 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id D8DEDA18E9C for ; Fri, 7 Oct 2011 12:00:17 +0000 (UTC) Received: by ywp31 with SMTP id 31so5209685ywp.11 for ; Fri, 07 Oct 2011 05:00:17 -0700 (PDT) Received: by 10.223.58.138 with SMTP id g10mr10283127fah.20.1317988817008; Fri, 07 Oct 2011 05:00:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs2033laf; Fri, 7 Oct 2011 05:00:16 -0700 (PDT) Received: by 10.236.129.130 with SMTP id h2mr9037776yhi.49.1317988815977; Fri, 07 Oct 2011 05:00:15 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id v13si3453722ane.120.2011.10.07.05.00.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Oct 2011 05:00:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by ywm13 with SMTP id 13so4187906ywm.37 for ; Fri, 07 Oct 2011 05:00:15 -0700 (PDT) Received: by 10.68.19.42 with SMTP id b10mr13754128pbe.83.1317988815238; Fri, 07 Oct 2011 05:00:15 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id p4sm30580311pbs.6.2011.10.07.05.00.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Oct 2011 05:00:14 -0700 (PDT) From: Tushar Behera To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: ben-linux@fluff.org, linux@arm.linux.org.uk, linaro-dev@lists.linaro.org, patches@linaro.org Subject: [PATCH V2 2/2] ARM: S3C2410: irq: Remove __init attributes to fix compilation warning Date: Fri, 7 Oct 2011 17:25:13 +0530 Message-Id: <1317988513-20800-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1317988513-20800-1-git-send-email-tushar.behera@linaro.org> References: <1317988513-20800-1-git-send-email-tushar.behera@linaro.org> The structure *_irq_driver is passed as a parameter in sysdev_driver_register(). This in turn would add this structure to a list which may be traversed later. Hence, even though the functions referenced through this structure have __init attribute, we cannot possibly add __initdata attribute to it. To remove compilation warnings, the functions referenced thorugh this structure are also defined without __init attribute. It removes following two warnings. WARNING: vmlinux.o(.data+0x4f58): Section mismatch in reference from the variable s3c2416_irq_driver to the function .init.text:s3c2416_irq_add() The variable s3c2416_irq_driver references the function __init s3c2416_irq_add() WARNING: vmlinux.o(.data+0x7c50): Section mismatch in reference from the variable s3c2443_irq_driver to the function .init.text:s3c2443_irq_add() The variable s3c2443_irq_driver references the function __init s3c2443_irq_add() Signed-off-by: Tushar Behera --- arch/arm/mach-s3c2416/irq.c | 4 ++-- arch/arm/mach-s3c2443/irq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c index 28ad20d..53e8e57 100644 --- a/arch/arm/mach-s3c2416/irq.c +++ b/arch/arm/mach-s3c2416/irq.c @@ -194,7 +194,7 @@ static struct irq_chip s3c2416_irq_uart3 = { /* IRQ initialisation code */ -static int __init s3c2416_add_sub(unsigned int base, +static int s3c2416_add_sub(unsigned int base, void (*demux)(unsigned int, struct irq_desc *), struct irq_chip *chip, @@ -213,7 +213,7 @@ static int __init s3c2416_add_sub(unsigned int base, return 0; } -static int __init s3c2416_irq_add(struct sys_device *sysdev) +static int s3c2416_irq_add(struct sys_device *sysdev) { printk(KERN_INFO "S3C2416: IRQ Support\n"); diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c index 83ecb11..18585dd 100644 --- a/arch/arm/mach-s3c2443/irq.c +++ b/arch/arm/mach-s3c2443/irq.c @@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = { /* IRQ initialisation code */ -static int __init s3c2443_add_sub(unsigned int base, +static int s3c2443_add_sub(unsigned int base, void (*demux)(unsigned int, struct irq_desc *), struct irq_chip *chip, @@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, return 0; } -static int __init s3c2443_irq_add(struct sys_device *sysdev) +static int s3c2443_irq_add(struct sys_device *sysdev) { printk("S3C2443: IRQ Support\n");