Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1304377 > unrolled thread

[PATCH] watchdog: asm9260: remove __init and __exit annotations

Started byArnd Bergmann <arnd@arndb.de>
First post2016-01-08 12:10 +0100
Last post2016-01-11 23:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: asm9260: remove __init and __exit annotations Arnd Bergmann <arnd@arndb.de> - 2016-01-08 12:10 +0100
    Re: [PATCH] watchdog: asm9260: remove __init and __exit annotations Guenter Roeck <linux@roeck-us.net> - 2016-01-08 15:40 +0100
    Re: [PATCH] watchdog: asm9260: remove __init and __exit annotations Wim Van Sebroeck <wim@iguana.be> - 2016-01-11 23:00 +0100

#1304377 — [PATCH] watchdog: asm9260: remove __init and __exit annotations

FromArnd Bergmann <arnd@arndb.de>
Date2016-01-08 12:10 +0100
Subject[PATCH] watchdog: asm9260: remove __init and __exit annotations
Message-ID<qOD5E-5Ri-19@gated-at.bofh.it>
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 <arnd@arndb.de>
Fixes: aae03dc98177 ("watchdog: add Alphascale asm9260-wdt driver")

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);
 

[toc] | [next] | [standalone]


#1304616

FromGuenter Roeck <linux@roeck-us.net>
Date2016-01-08 15:40 +0100
Message-ID<qOGmR-812-5@gated-at.bofh.it>
In reply to#1304377
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 <arnd@arndb.de>
> Fixes: aae03dc98177 ("watchdog: add Alphascale asm9260-wdt driver")

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

>
> 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);
>
>
>

[toc] | [prev] | [next] | [standalone]


#1306738

FromWim Van Sebroeck <wim@iguana.be>
Date2016-01-11 23:00 +0100
Message-ID<qPSFl-8fi-19@gated-at.bofh.it>
In reply to#1304377
Hi Arnd,

> 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 <arnd@arndb.de>
> Fixes: aae03dc98177 ("watchdog: add Alphascale asm9260-wdt driver")
> 
> 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);
>  
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web