From patchwork Wed Aug 8 14:47:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10596 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 7F1DC23E53 for ; Wed, 8 Aug 2012 14:47:50 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4F06CA190A9 for ; Wed, 8 Aug 2012 14:47:50 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so847675ghb.11 for ; Wed, 08 Aug 2012 07:47:50 -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=QKHITcSw4invglbQh1bfYsNwcISGBNzW1++Bie/TfeE=; b=iO+edTW904bhoKWTk8mf0+DsFh99tFkdP8V7SElW0UOjHHPoed9LL5V3PBZ/ghqBl4 ChD5eb9KPBf+RDobgOA9vyVjeOPrmtZaL3DYhPp4fu0dp1GiXbMHTw0LXGD5xW5hlhTP xgLiD8wKhw+XU8wRnXs5NmX9GzKc7hO9og3k48iZ86ilHuefmoNguPXi2Jjhu2YuuvJV CIg9l7cSwceowCrHv3xD5zZfLBfG5V6w4HBEY2XEUPC5vpdLyytd359MvIx/ctPHgFsi BL88Io1Jnr11uNwdUBLup0qDIrMR/WqdB3jlcsMxDmojHtajAPTNKTOkVwdTXpd7gZjp GEtg== Received: by 10.50.6.229 with SMTP id e5mr1280152iga.9.1344437269620; Wed, 08 Aug 2012 07:47:49 -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.200 with SMTP id ew8csp611887igc; Wed, 8 Aug 2012 07:47:48 -0700 (PDT) Received: by 10.205.127.131 with SMTP id ha3mr7753836bkc.123.1344437268086; Wed, 08 Aug 2012 07:47:48 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTP id c13si5626434bkw.121.2012.08.08.07.47.47; Wed, 08 Aug 2012 07:47:48 -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 klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MQu7S-1TAYZ71wy6-00TqUU; Wed, 08 Aug 2012 16:47:36 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Stefan Roese , Giuseppe Cavallaro , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH 07/11] net/stmmac: mark probe function as __devinit Date: Wed, 8 Aug 2012 16:47:24 +0200 Message-Id: <1344437248-20560-8-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344437248-20560-1-git-send-email-arnd@arndb.de> References: <1344437248-20560-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:inJnpn/HTsDtvNMO87XOsVab1X71ILad0I2BWePxoOW xGo8ZZoLI7u9gvf5AL0AmpFRof4Gaaae2jPp4/hF97ka+fy+Bk Z2/dTHaSNoA1OhD3Lz5kOdmGZ2EjoVvyA3MiEU8BnD6HZKnaQv oyyNvPthgUN4UxkfPX2Rw2dGyrfjyP9zcbEnee6dfuLPa69ivx G3m122STy2TehNioRk82G7v3xamRJNBvZDqX1ZeKxnTBYQbCco j9g66bLPSK8ANxwEiQSyc2vzHFC+gjSWqqBHfLbAg8PkpMax6o FYGI20okyoyfnf4vuGzLdZzgMxAU4XeKS8KPwB7SovYv08kLvt 3IxbB4On14lQ9iXNWGknvXWijy54ouMIHdUQohjMrmYEchWFme a6F6ZytkfAYf6TTsFTbePg6IRBiR1HaRqg= X-Gm-Message-State: ALoCoQluUT2WgJApG3LVSYHbuWBH8a2t0RHfEC31zsfQC4MYMnAuyxERj9y3par73Hjs7P8P0CMF Driver probe functions are generally __devinit so they will be discarded after initialization for non-hotplug kernels. This was found by a new warning after patch 6a228452d "stmmac: Add device-tree support" adds a new __devinit function that is called from stmmac_pltfr_probe. Without this patch, building socfpga_defconfig results in: WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt() The function stmmac_pltfr_probe() references the function __devinit stmmac_probe_config_dt(). This is often because stmmac_pltfr_probe lacks a __devinit annotation or the annotation of stmmac_probe_config_dt is wrong. Signed-off-by: Arnd Bergmann Cc: Stefan Roese Cc: Giuseppe Cavallaro Cc: David S. Miller Cc: netdev@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index cd01ee7..b93245c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -74,7 +74,7 @@ static int __devinit stmmac_probe_config_dt(struct platform_device *pdev, * the necessary resources and invokes the main to init * the net device, register the mdio bus etc. */ -static int stmmac_pltfr_probe(struct platform_device *pdev) +static int __devinit stmmac_pltfr_probe(struct platform_device *pdev) { int ret = 0; struct resource *res;