From patchwork Thu Aug 25 19:24:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timur Tabi X-Patchwork-Id: 111646 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 097E1B73D9 for ; Fri, 26 Aug 2011 05:24:49 +1000 (EST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe001.messaging.microsoft.com [216.32.181.181]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 4F912B6F8F for ; Fri, 26 Aug 2011 05:24:26 +1000 (EST) Received: from mail13-ch1-R.bigfish.com (216.32.181.168) by CH1EHSOBE003.bigfish.com (10.43.70.53) with Microsoft SMTP Server id 14.1.225.22; Thu, 25 Aug 2011 19:24:19 +0000 Received: from mail13-ch1 (localhost.localdomain [127.0.0.1]) by mail13-ch1-R.bigfish.com (Postfix) with ESMTP id D1B646F8242; Thu, 25 Aug 2011 19:24:19 +0000 (UTC) X-SpamScore: -9 X-BigFish: VS-9(zz1432N98dKzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail13-ch1 (localhost.localdomain [127.0.0.1]) by mail13-ch1 (MessageSwitch) id 1314300259662241_30263; Thu, 25 Aug 2011 19:24:19 +0000 (UTC) Received: from CH1EHSMHS011.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.248]) by mail13-ch1.bigfish.com (Postfix) with ESMTP id 940DA148804B; Thu, 25 Aug 2011 19:24:19 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS011.bigfish.com (10.43.70.11) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 25 Aug 2011 19:24:16 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.2; Thu, 25 Aug 2011 14:24:15 -0500 Received: from [10.82.123.3] (efes.am.freescale.net [10.82.123.3]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p7PJOEeo026523; Thu, 25 Aug 2011 14:24:14 -0500 (CDT) Message-ID: <4E56A15D.8070406@freescale.com> Date: Thu, 25 Aug 2011 14:24:13 -0500 From: Timur Tabi Organization: Freescale User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110429 Fedora/3.6.17-1.fc13 Firefox/3.6.17 MIME-Version: 1.0 To: Arnaud Lacombe Subject: Re: [PATCH] xics/icp_natives: add __init to marker icp_native_init() References: <1314288433-26322-1-git-send-email-lacombar@gmail.com> In-Reply-To: <1314288433-26322-1-git-send-email-lacombar@gmail.com> X-OriginatorOrg: freescale.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Arnaud Lacombe wrote: > This should fix the following warning: > > LD arch/powerpc/sysdev/xics/built-in.o > WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1310): Section mismatch in > reference from the function .icp_native_init() to the function > .init.text:.icp_native_init_one_node() > The function .icp_native_init() references > the function __init .icp_native_init_one_node(). > This is often because .icp_native_init lacks a __init > annotation or the annotation of .icp_native_init_one_node is wrong. > > icp_native_init() is only referenced in `arch/powerpc/sysdev/xics/xics-common.c' > by xics_init() which is itself marked with __init. > > = not built-tested = > > Reported-by: Timur Tabi > Signed-off-by: Arnaud Lacombe Acked-by: Timur Tabi This warning still appears, though: WARNING: arch/powerpc/sysdev/built-in.o(.text+0xf6b8): Section mismatch in reference from the function .ics_rtas_init() to the function .init.text:.xics_register_ics() The function .ics_rtas_init() references the function __init .xics_register_ics(). This is often because .ics_rtas_init lacks a __init annotation or the annotation of .xics_register_ics is wrong. To fix this warning, you'll also need: However, now we get another similar warning: WARNING: drivers/built-in.o(.text+0x259c484): Section mismatch in reference from the function .tc3589x_keypad_open() to the function .devinit.text:.tc3589x_keypad_init_key_hardware() The function .tc3589x_keypad_open() references the function __devinit .tc3589x_keypad_init_key_hardware(). This is often because .tc3589x_keypad_open lacks a __devinit annotation or the annotation of .tc3589x_keypad_init_key_hardware is wrong. I'm not sure what to do at this point, because I have a suspicion that adding __devinit to tc3589x_keypad_open() is wrong. diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics- index c782f85..a125721 100644 --- a/arch/powerpc/sysdev/xics/ics-rtas.c +++ b/arch/powerpc/sysdev/xics/ics-rtas.c @@ -213,7 +213,7 @@ static int ics_rtas_host_match(struct ics *ics, struct devic return !of_device_is_compatible(node, "chrp,iic"); } -int ics_rtas_init(void) +int __init ics_rtas_init(void) { ibm_get_xive = rtas_token("ibm,get-xive"); ibm_set_xive = rtas_token("ibm,set-xive");