From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754685AbcAHOfw (ORCPT ); Fri, 8 Jan 2016 09:35:52 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:48877 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbcAHOfu (ORCPT ); Fri, 8 Jan 2016 09:35:50 -0500 Subject: Re: [PATCH] watchdog: asm9260: remove __init and __exit annotations To: Arnd Bergmann , Wim Van Sebroeck , linux-watchdog@vger.kernel.org References: <24150770.U3pBDPnky8@wuerfel> Cc: Oleksij Rempel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Guenter Roeck Message-ID: <568FC941.1000307@roeck-us.net> Date: Fri, 8 Jan 2016 06:35:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <24150770.U3pBDPnky8@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/2016 02:59 AM, Arnd Bergmann wrote: > The probe and release functions in this driver are marked > as __init and __exit, but this is wrong as indicated by this > Kbuild error message: > > WARNING: vmlinux.o(.data+0x1d2308): Section mismatch in reference from the variable asm9260_wdt_driver to the function .init.text:asm9260_wdt_probe() > > This removes the annotations, to make the sysfs unbind attribute > and deferred probing work. > > Signed-off-by: Arnd Bergmann > Fixes: aae03dc98177 ("watchdog: add Alphascale asm9260-wdt driver") Reviewed-by: Guenter Roeck > > diff --git a/drivers/watchdog/asm9260_wdt.c b/drivers/watchdog/asm9260_wdt.c > index 1c22ff4c523a..c9686b2fdafd 100644 > --- a/drivers/watchdog/asm9260_wdt.c > +++ b/drivers/watchdog/asm9260_wdt.c > @@ -198,7 +198,7 @@ static struct watchdog_ops asm9260_wdt_ops = { > .set_timeout = asm9260_wdt_settimeout, > }; > > -static int __init asm9260_wdt_get_dt_clks(struct asm9260_wdt_priv *priv) > +static int asm9260_wdt_get_dt_clks(struct asm9260_wdt_priv *priv) > { > int err; > unsigned long clk; > @@ -250,7 +250,7 @@ static int __init asm9260_wdt_get_dt_clks(struct asm9260_wdt_priv *priv) > return 0; > } > > -static void __init asm9260_wdt_get_dt_mode(struct asm9260_wdt_priv *priv) > +static void asm9260_wdt_get_dt_mode(struct asm9260_wdt_priv *priv) > { > const char *tmp; > int ret; > @@ -274,7 +274,7 @@ static void __init asm9260_wdt_get_dt_mode(struct asm9260_wdt_priv *priv) > tmp); > } > > -static int __init asm9260_wdt_probe(struct platform_device *pdev) > +static int asm9260_wdt_probe(struct platform_device *pdev) > { > struct asm9260_wdt_priv *priv; > struct watchdog_device *wdd; > @@ -364,7 +364,7 @@ static void asm9260_wdt_shutdown(struct platform_device *pdev) > asm9260_wdt_disable(&priv->wdd); > } > > -static int __exit asm9260_wdt_remove(struct platform_device *pdev) > +static int asm9260_wdt_remove(struct platform_device *pdev) > { > struct asm9260_wdt_priv *priv = platform_get_drvdata(pdev); > > >