From patchwork Tue Nov 17 08:47:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 38593 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 984BEB7B65 for ; Tue, 17 Nov 2009 19:47:45 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905AbZKQIre (ORCPT ); Tue, 17 Nov 2009 03:47:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752771AbZKQIre (ORCPT ); Tue, 17 Nov 2009 03:47:34 -0500 Received: from chilli.pcug.org.au ([203.10.76.44]:53639 "EHLO smtps.tip.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbZKQIre (ORCPT ); Tue, 17 Nov 2009 03:47:34 -0500 Received: from canb.auug.org.au (bh02i525f01.au.ibm.com [202.81.18.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtps.tip.net.au (Postfix) with ESMTPSA id 5F9AE14C067; Tue, 17 Nov 2009 19:47:34 +1100 (EST) Date: Tue, 17 Nov 2009 19:47:33 +1100 From: Stephen Rothwell To: "David S. Miller" Cc: netdev@vger.kernel.org, Laurent Pinchart , Paulius Zaleckas , Mark Ware Subject: [PATCH] net: fix mdio section mismatch warning Message-Id: <20091117194733.bd2308a8.sfr@canb.auug.org.au> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.3; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This fixes the following warning: WARNING: drivers/net/phy/built-in.o(.devexit.text+0x70): Section mismatch in reference from the function .mdio_gpio_bus_destroy() to the function .devinit.text:.mdio_gpio_bus_deinit() The function __devexit .mdio_gpio_bus_destroy() references a function __devinit .mdio_gpio_bus_deinit(). This is often seen when error handling in the exit function uses functionality in the init path. The fix is often to remove the __devinit annotation of .mdio_gpio_bus_deinit() so it may be used outside an init section. Signed-off-by: Stephen Rothwell --- drivers/net/phy/mdio-gpio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 8659d34..3589713 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c @@ -139,7 +139,7 @@ out: return NULL; } -static void __devinit mdio_gpio_bus_deinit(struct device *dev) +static void mdio_gpio_bus_deinit(struct device *dev) { struct mii_bus *bus = dev_get_drvdata(dev); struct mdio_gpio_info *bitbang = bus->priv;