linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] ISDN PCBIT: #ifdef MODULE some code
@ 2003-07-28 20:25 Adrian Bunk
  2003-08-15 16:51 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2003-07-28 20:25 UTC (permalink / raw)
  To: roque, isdn4linux; +Cc: linux-kernel, trivial

I got the following error at the final linkage of 2.6.0-test2 if 
CONFIG_ISDN_DRV_PCBIT is compiled statically:

<--  snip  -->

...
  LD      .tmp_vmlinux1
...
drivers/built-in.o(.exit.text+0xe183): In function `pcbit_exit':
: undefined reference to `pcbit_terminate'
make: *** [.tmp_vmlinux1] Error 1

<--  snip  -->


I don't know whether the following patch is the best solution, but it 
solves the problem:

--- linux-2.6.0-test2-full-no-smp/drivers/isdn/pcbit/module.c.tmp	2003-07-28 22:03:38.000000000 +0200
+++ linux-2.6.0-test2-full-no-smp/drivers/isdn/pcbit/module.c	2003-07-28 22:08:57.000000000 +0200
@@ -82,12 +82,14 @@
 
 static void __exit pcbit_exit(void)
 {
+#ifdef MODULE
 	int board;
 
 	for (board = 0; board < num_boards; board++)
 		pcbit_terminate(board);
 	printk(KERN_NOTICE 
 	       "PCBIT-D module unloaded\n");
+#endif
 }
 
 #ifndef MODULE



cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [2.6 patch] ISDN PCBIT: #ifdef MODULE some code
  2003-07-28 20:25 [2.6 patch] ISDN PCBIT: #ifdef MODULE some code Adrian Bunk
@ 2003-08-15 16:51 ` Rusty Russell
  2003-08-15 20:46   ` Adrian Bunk
  2003-08-16 11:44   ` Karsten Keil
  0 siblings, 2 replies; 4+ messages in thread
From: Rusty Russell @ 2003-08-15 16:51 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: isdn4linux, linux-kernel

In message <20030728202500.GM25402@fs.tum.de> you write:
> I got the following error at the final linkage of 2.6.0-test2 if 
> CONFIG_ISDN_DRV_PCBIT is compiled statically:
> 
> <--  snip  -->
> 
> ...
>   LD      .tmp_vmlinux1
> ...
> drivers/built-in.o(.exit.text+0xe183): In function `pcbit_exit':
> : undefined reference to `pcbit_terminate'
> make: *** [.tmp_vmlinux1] Error 1

AFAICT This is also broken in 2.4.22-rc2, which makes me wonder if
anyone actually cares about this driver?

Taken anyway, for both.
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

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

* Re: [2.6 patch] ISDN PCBIT: #ifdef MODULE some code
  2003-08-15 16:51 ` Rusty Russell
@ 2003-08-15 20:46   ` Adrian Bunk
  2003-08-16 11:44   ` Karsten Keil
  1 sibling, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2003-08-15 20:46 UTC (permalink / raw)
  To: Rusty Russell; +Cc: isdn4linux, linux-kernel

On Sat, Aug 16, 2003 at 02:51:20AM +1000, Rusty Russell wrote:
> In message <20030728202500.GM25402@fs.tum.de> you write:
> > I got the following error at the final linkage of 2.6.0-test2 if 
> > CONFIG_ISDN_DRV_PCBIT is compiled statically:
> > 
> > <--  snip  -->
> > 
> > ...
> >   LD      .tmp_vmlinux1
> > ...
> > drivers/built-in.o(.exit.text+0xe183): In function `pcbit_exit':
> > : undefined reference to `pcbit_terminate'
> > make: *** [.tmp_vmlinux1] Error 1
> 
> AFAICT This is also broken in 2.4.22-rc2, which makes me wonder if
> anyone actually cares about this driver?

It doesn't cause a compile error in 2.4.

This is inside an __exit function and in 2.4 __exit functions are 
discarded at link time when compiling a driver statically.

Due to changes Andi Kleen did in 2.6 __exit functions are no longer
discarded at link time when compiling a driver statically (they are
discarded at runtime).

> Taken anyway, for both.
> Rusty.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [2.6 patch] ISDN PCBIT: #ifdef MODULE some code
  2003-08-15 16:51 ` Rusty Russell
  2003-08-15 20:46   ` Adrian Bunk
@ 2003-08-16 11:44   ` Karsten Keil
  1 sibling, 0 replies; 4+ messages in thread
From: Karsten Keil @ 2003-08-16 11:44 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Adrian Bunk, isdn4linux, linux-kernel

On Sat, Aug 16, 2003 at 02:51:20AM +1000, Rusty Russell wrote:
> In message <20030728202500.GM25402@fs.tum.de> you write:
> > I got the following error at the final linkage of 2.6.0-test2 if 
> > CONFIG_ISDN_DRV_PCBIT is compiled statically:
> > 
> > <--  snip  -->
> > 
> > ...
> >   LD      .tmp_vmlinux1
> > ...
> > drivers/built-in.o(.exit.text+0xe183): In function `pcbit_exit':
> > : undefined reference to `pcbit_terminate'
> > make: *** [.tmp_vmlinux1] Error 1
> 
> AFAICT This is also broken in 2.4.22-rc2, which makes me wonder if
> anyone actually cares about this driver?
> 
> Taken anyway, for both.

It is used, I got some reports last year (but this card is only sold in
Portugal and is expensiv so far I know and so not so much people
using this card and linux).

Here 2 reasons why such thinks don't matter today:
1. 99% compile the ISDN stuff as module (and some parts are only work as
   modules)
2. In 2.4 the exit function is removed at compile time, if not compiled as
   modul.

I preparing lot of bugfixes for ISDN and 2.6, but testing needs much time and
many things are broken not only at compile time.

-- 
Karsten Keil
SuSE Labs
ISDN development

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

end of thread, other threads:[~2003-08-16 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-28 20:25 [2.6 patch] ISDN PCBIT: #ifdef MODULE some code Adrian Bunk
2003-08-15 16:51 ` Rusty Russell
2003-08-15 20:46   ` Adrian Bunk
2003-08-16 11:44   ` Karsten Keil

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