linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
@ 2019-12-10 19:54 Arnd Bergmann
  2019-12-10 20:24 ` Chris Packham
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2019-12-10 19:54 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, Scott Branden, Ray Jui, Yoshihiro Shimoda,
	YueHaibing, linux-kernel, linux-gpio, Mark Brown,
	bcm-kernel-feedback-list, Chris Packham, linux-arm-kernel

When built into the kernel, the driver causes a link problem:

`iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o

Remove the incorrect annotation.

Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpio-xgs-iproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c
index 773e5c24309e..b21c2e436b61 100644
--- a/drivers/gpio/gpio-xgs-iproc.c
+++ b/drivers/gpio/gpio-xgs-iproc.c
@@ -280,7 +280,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int __exit iproc_gpio_remove(struct platform_device *pdev)
+static int iproc_gpio_remove(struct platform_device *pdev)
 {
 	struct iproc_gpio_chip *chip;
 
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
  2019-12-10 19:54 [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove Arnd Bergmann
@ 2019-12-10 20:24 ` Chris Packham
  2019-12-10 20:28   ` Arnd Bergmann
  2019-12-11  9:14   ` Bartosz Golaszewski
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Packham @ 2019-12-10 20:24 UTC (permalink / raw)
  To: arnd, linus.walleij, bgolaszewski
  Cc: scott.branden, rjui, yoshihiro.shimoda.uh, yuehaibing,
	linux-kernel, linux-gpio, broonie, bcm-kernel-feedback-list,
	linux-arm-kernel

On Tue, 2019-12-10 at 20:54 +0100, Arnd Bergmann wrote:
> When built into the kernel, the driver causes a link problem:
> 
> `iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o
> 
> Remove the incorrect annotation.
> 
> Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

What's the current best practice w.r.t.__init and __exit? I seem to
have messed this up on multiple fronts.

> ---
>  drivers/gpio/gpio-xgs-iproc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c
> index 773e5c24309e..b21c2e436b61 100644
> --- a/drivers/gpio/gpio-xgs-iproc.c
> +++ b/drivers/gpio/gpio-xgs-iproc.c
> @@ -280,7 +280,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int __exit iproc_gpio_remove(struct platform_device *pdev)
> +static int iproc_gpio_remove(struct platform_device *pdev)
>  {
>  	struct iproc_gpio_chip *chip;
>  
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
  2019-12-10 20:24 ` Chris Packham
@ 2019-12-10 20:28   ` Arnd Bergmann
  2019-12-11  9:14   ` Bartosz Golaszewski
  1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:28 UTC (permalink / raw)
  To: Chris Packham
  Cc: scott.branden, rjui, linus.walleij, yuehaibing, linux-kernel,
	bgolaszewski, broonie, bcm-kernel-feedback-list, linux-gpio,
	yoshihiro.shimoda.uh, linux-arm-kernel

On Tue, Dec 10, 2019 at 9:24 PM Chris Packham
<Chris.Packham@alliedtelesis.co.nz> wrote:
>
> On Tue, 2019-12-10 at 20:54 +0100, Arnd Bergmann wrote:
> > When built into the kernel, the driver causes a link problem:
> >
> > `iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o
> >
> > Remove the incorrect annotation.
> >
> > Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>
> What's the current best practice w.r.t.__init and __exit? I seem to
> have messed this up on multiple fronts.

These are used for anything that is a module_init() function or a
module_exit() function, or called from one, but generally not
for any callbacks.

In particular the probe() and remove() callbacks of a device driver
can get called at runtime when the device is hotplugged through
sysfs.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
  2019-12-10 20:24 ` Chris Packham
  2019-12-10 20:28   ` Arnd Bergmann
@ 2019-12-11  9:14   ` Bartosz Golaszewski
  1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2019-12-11  9:14 UTC (permalink / raw)
  To: Chris Packham
  Cc: arnd, scott.branden, rjui, yoshihiro.shimoda.uh, yuehaibing,
	linux-kernel, linux-gpio, broonie, bcm-kernel-feedback-list,
	linus.walleij, linux-arm-kernel

wt., 10 gru 2019 o 21:24 Chris Packham
<Chris.Packham@alliedtelesis.co.nz> napisał(a):
>
> On Tue, 2019-12-10 at 20:54 +0100, Arnd Bergmann wrote:
> > When built into the kernel, the driver causes a link problem:
> >
> > `iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o
> >
> > Remove the incorrect annotation.
> >
> > Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>
> What's the current best practice w.r.t.__init and __exit? I seem to
> have messed this up on multiple fronts.
>

Applied for fixes.

Bartosz

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-11  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 19:54 [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove Arnd Bergmann
2019-12-10 20:24 ` Chris Packham
2019-12-10 20:28   ` Arnd Bergmann
2019-12-11  9:14   ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).