mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwmon: w83781d doesn't link when built-in
@ 2008-10-26 14:20 Geert Uytterhoeven
  2008-10-26 15:36 ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-10-26 14:20 UTC (permalink / raw)
  To: Wolfgang Grandegger, Jean Delvare; +Cc: Andrew Morton, Linux Kernel Development

When w83781d is built-in, the final links fails with the following vague error
message:

`.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined
in discarded section `.exit.text' of drivers/built-in.o

w83781d_isa_unregister() cannot be marked __exit, as it's also called from
sensors_w83781d_init(), which is marked __init.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/hwmon/w83781d.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1968,7 +1968,7 @@ exit:
 	return res;
 }
 
-static void __exit
+static void
 w83781d_isa_unregister(void)
 {
 	if (pdev) {
@@ -2017,7 +2017,7 @@ w83781d_isa_register(void)
 	return 0;
 }
 
-static void __exit
+static void
 w83781d_isa_unregister(void)
 {
 }

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: [PATCH] hwmon: w83781d doesn't link when built-in
  2008-10-26 14:20 [PATCH] hwmon: w83781d doesn't link when built-in Geert Uytterhoeven
@ 2008-10-26 15:36 ` Jean Delvare
  2008-10-26 18:35   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2008-10-26 15:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfgang Grandegger, Andrew Morton, Linux Kernel Development

Hi Geert,

On Sun, 26 Oct 2008 15:20:26 +0100 (CET), Geert Uytterhoeven wrote:
> When w83781d is built-in, the final links fails with the following vague error
> message:
> 
> `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined
> in discarded section `.exit.text' of drivers/built-in.o
> 
> w83781d_isa_unregister() cannot be marked __exit, as it's also called from
> sensors_w83781d_init(), which is marked __init.

Good catch, thanks for reporting. For some reason the link doesn't fail
here.

> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/hwmon/w83781d.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/hwmon/w83781d.c
> +++ b/drivers/hwmon/w83781d.c
> @@ -1968,7 +1968,7 @@ exit:
>  	return res;
>  }
>  
> -static void __exit
> +static void
>  w83781d_isa_unregister(void)
>  {
>  	if (pdev) {
> @@ -2017,7 +2017,7 @@ w83781d_isa_register(void)
>  	return 0;
>  }
>  
> -static void __exit
> +static void
>  w83781d_isa_unregister(void)
>  {
>  }

Applied, thanks. I'll send this to Linus together with several other
hwmon patches later today.

-- 
Jean Delvare

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

* Re: [PATCH] hwmon: w83781d doesn't link when built-in
  2008-10-26 15:36 ` Jean Delvare
@ 2008-10-26 18:35   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-10-26 18:35 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Wolfgang Grandegger, Andrew Morton, Linux Kernel Development

On Sun, 26 Oct 2008, Jean Delvare wrote:
> On Sun, 26 Oct 2008 15:20:26 +0100 (CET), Geert Uytterhoeven wrote:
> > When w83781d is built-in, the final links fails with the following vague error
> > message:
> > 
> > `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined
> > in discarded section `.exit.text' of drivers/built-in.o
> > 
> > w83781d_isa_unregister() cannot be marked __exit, as it's also called from
> > sensors_w83781d_init(), which is marked __init.
> 
> Good catch, thanks for reporting. For some reason the link doesn't fail
> here.

Probably w83781d_isa_unregister() got inlined?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

end of thread, other threads:[~2008-10-26 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-26 14:20 [PATCH] hwmon: w83781d doesn't link when built-in Geert Uytterhoeven
2008-10-26 15:36 ` Jean Delvare
2008-10-26 18:35   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®