Thread (1 message) 1 message, 1 author, 2007-05-31
STALE7041d

[PATCH] net/hp100: fix section mismatch warning

From: Sam Ravnborg <hidden>
Date: 2007-05-31 20:08:44
Also in: lkml
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Fix following section mismatch warning in hp100:

WARNING: drivers/net/hp100.o(.init.text+0x26a): Section mismatch: reference to .exit.text: (after 'init_module')

The warning says that we use a function marked __exit from a 
function marked __init.
This is not good on architectures where we discard __exit section
for drivers that are built-in.

Signed-off-by: Sam Ravnborg <redacted>
---
Comple tested only.

Note: This warning does not appear with modpost in upstream kernel
      but I would like to submit patches for the obvious bugs ASAP

	Sam
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 8118a67..8caa591 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -3005,7 +3005,7 @@ static int __init hp100_isa_init(void)
 	return cards > 0 ? 0 : -ENODEV;
 }
 
-static void __exit hp100_isa_cleanup(void)
+static void hp100_isa_cleanup(void)
 {
 	int i;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help