From patchwork Tue Oct 2 16:36:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11950 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 D030223EFF for ; Tue, 2 Oct 2012 16:37:17 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7B38AA1881B for ; Tue, 2 Oct 2012 16:37:17 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so14608949iej.11 for ; Tue, 02 Oct 2012 09:37:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=05IeYbVzPeMZ0ZCR8SMdAKSOdms8xRPOsj/PV2Khlp0=; b=SPxpunwJNtgHPwrSaXOtLJfAQ/nArFJVgn+RVlKlrVnuJTmrzS/D9hEXPxJ1Y6KnwX IK2Ecuq7jVG8MQAZTZlq/CkkilPo9fYn3iNseucmC+kZH7AbTAl0IQ8sX6tPXjUteUI+ 22AHnDiB34tTdSFh/kbTJqu1ueX1dA1sAz1/abby/gJfMBOo0U6Mu85St1ZvP7pDPk5d xVZDy8DqOpWEwC1G+BsLoiZffAnNZT0ySM2RwHHX1svwtkqothwo6x9qS1DNCOJLWVde by/Vd2DNro5ZyTp2SqXcsryddOVpzEtThQ1hwKrQO4PjE9HRR7A/E4Pn243CgT4zwGD7 HViA== Received: by 10.50.154.137 with SMTP id vo9mr8814656igb.28.1349195837141; Tue, 02 Oct 2012 09:37: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.50.184.232 with SMTP id ex8csp92043igc; Tue, 2 Oct 2012 09:37:16 -0700 (PDT) Received: by 10.180.79.34 with SMTP id g2mr17813861wix.19.1349195835273; Tue, 02 Oct 2012 09:37:15 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTPS id k79si1730165wej.48.2012.10.02.09.37.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 09:37:15 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.10; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M1zLv-1TXrYv0nbH-00td1I; Tue, 02 Oct 2012 18:37:14 +0200 From: Arnd Bergmann To: linux-arm-kernel@infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Ben Dooks , Kukjin Kim Subject: [PATCH 10/17] ARM: s3c24xx: fix multiple section mismatch warnings Date: Tue, 2 Oct 2012 18:36:49 +0200 Message-Id: <1349195816-2225-11-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349195816-2225-1-git-send-email-arnd@arndb.de> References: <1349195816-2225-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:DdiIwiYvzWkgNbI/HIxJ/RxdHgAgwD7RE0P1/zi//MB KpHl+VH7TFKasrXtdOGg6Ziw98tiaCFf7EgYyi+gC3/lrgAgoW PNr50pi9lM7o5vXJPCV7OIUHaFEt6ruHYe7UV9afZmjht+quOq Ha74DI0+Kh6un9GrzcxSEBt7TskrpY9zL9AeYLxN6OAiDgv6dx IEtH//K45i+QwRB+kjV5BAKuUL57Yoq4Hb74utK9hqFVl1Ss3x L81akPXHlOg0ZqKxvKqvtjYJ/vmD7SdgEE/1BhECzoZOVYtWLN ViKlLMJ/Tgwy9W3UCyygRCxovz4mxlN41oHovQcUHglSvI6o52 2pi5+FtuIQ15oPfloVp9tDcN0A/LprAhoimy07hGIJ+LLtm5mz FeDp56i740uhg== X-Gm-Message-State: ALoCoQn3tiVMfQhFhYLTAOK+i0P7dDjKSwrJs8Abtq/NTG1gSspmbQCWHKZ1YVjHtfkGRCJbme7u The *_irq_add function should not be marked __init because the driver subsystem thinks they might be called at a later stage. The usb_simtec_init function accesses initdata and should be marked init. This is safe because the only caller is also an init function. Without this patch, building s3c2410_defconfig results in: WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1030): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add() The variable s3c2416_irq_interface references the function __init s3c2416_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1b08): Section mismatch in reference from the variable s3c2443_irq_interface to the function .init.text:s3c2443_irq_add() The variable s3c2443_irq_interface references the function __init s3c2443_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0xf44): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add() The variable s3c2416_irq_interface references the function __init s3c2416_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.text+0x3f7c): Section mismatch in reference from the function usb_simtec_init() to the (unknown reference) .init.data:(unknown) The function usb_simtec_init() references the (unknown reference) __initdata (unknown). This is often because usb_simtec_init lacks a __initdata annotation or the annotation of (unknown) is wrong. Signed-off-by: Arnd Bergmann Cc: Ben Dooks Cc: Kukjin Kim --- arch/arm/mach-s3c24xx/irq-s3c2416.c | 6 +++--- arch/arm/mach-s3c24xx/irq-s3c2443.c | 4 ++-- arch/arm/mach-s3c24xx/simtec-usb.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-s3c24xx/irq-s3c2416.c b/arch/arm/mach-s3c24xx/irq-s3c2416.c index 23ec973..ff141b0 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2416.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2416.c @@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = { /* 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, @@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base, return 0; } -static void __init s3c2416_irq_add_second(void) +static void s3c2416_irq_add_second(void) { unsigned long pend; unsigned long last; @@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void) } } -static int __init s3c2416_irq_add(struct device *dev, +static int s3c2416_irq_add(struct device *dev, struct subsys_interface *sif) { printk(KERN_INFO "S3C2416: IRQ Support\n"); diff --git a/arch/arm/mach-s3c24xx/irq-s3c2443.c b/arch/arm/mach-s3c24xx/irq-s3c2443.c index ac2829f..5e69109 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2443.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2443.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 device *dev, +static int s3c2443_irq_add(struct device *dev, struct subsys_interface *sif) { printk("S3C2443: IRQ Support\n"); diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c index d91c1a7..c303d1b 100644 --- a/arch/arm/mach-s3c24xx/simtec-usb.c +++ b/arch/arm/mach-s3c24xx/simtec-usb.c @@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = { }; -int usb_simtec_init(void) +int __init usb_simtec_init(void) { int ret;