From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758643Ab2HHOrm (ORCPT ); Wed, 8 Aug 2012 10:47:42 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:64940 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758580Ab2HHOri (ORCPT ); Wed, 8 Aug 2012 10:47:38 -0400 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= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 1.7.10 From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 8 Aug 2012 16:47:24 +0200 Subject: [PATCH 07/11] net/stmmac: mark probe function as __devinit In-Reply-To: <1344437248-20560-1-git-send-email-arnd@arndb.de> References: <1344437248-20560-1-git-send-email-arnd@arndb.de> Message-ID: <1344437248-20560-8-git-send-email-arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 at 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; -- 1.7.10