net: fix section mismatch warnings in dccp/ccids/lib/tfrc.c
Subsystems (3)
PATCH 1/1 net: fix section mismatch warnings in dccp/ccids/lib/tfrc.c
From: Leonardo Potenza <[email protected]>
Removed the __exit annotation of tfrc_lib_exit(), in order to suppress the following section mismatch messages:
WARNING: net/dccp/dccp.o(.text+0xd9): Section mismatch in reference from the function ccid_cleanup_builtins() to the function .exit.text:tfrc_lib_exit() The function ccid_cleanup_builtins() references a function in an exit section.
Often the function tfrc_lib_exit() has valid usage outside the exit section
and the fix is to remove the __exit annotation of tfrc_lib_exit.
WARNING: net/dccp/dccp.o(.init.text+0x48): Section mismatch in reference from the function ccid_initialize_builtins() to the function .exit.text:tfrc_lib_exit() The function __init ccid_initialize_builtins() references
a function __exit tfrc_lib_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation oftfrc_lib_exit() so it may be used outside an exit section.
---
Index: linux-2.6/net/dccp/ccids/lib/tfrc.c
=================================--- linux-2.6.orig/net/dccp/ccids/lib/tfrc.c 2009-01-08 19:19:50.000000000 +0100
+++ linux-2.6/net/dccp/ccids/lib/tfrc.c 2009-01-08 19:20:07.000000000 +0100
@@ -36,7 +36,7 @@ out:
return rc;
}
-void __exit tfrc_lib_exit(void)
+void tfrc_lib_exit(void)
{
tfrc_rx_packet_history_exit();
tfrc_tx_packet_history_exit();
Adding netdev to the CC list.
Em Thu, Jan 08, 2009 at 07:57:03PM +0100, Leonardo Potenza escreveu:
Quoted 23 lines
From: Leonardo Potenza <[email protected]>
Removed the
__exitannotation oftfrc_lib_exit(), in order to suppress the following section mismatch messages:WARNING: net/dccp/dccp.o(.text+0xd9): Section mismatch in reference from the function
ccid_cleanup_builtins()to the function .exit.text:tfrc_lib_exit() The functionccid_cleanup_builtins()references a function in an exit section.
Often the functiontfrc_lib_exit()has valid usage outside the exit section
and the fix is to remove the__exitannotation oftfrc_lib_exit.WARNING: net/dccp/dccp.o(.init.text+0x48): Section mismatch in reference from the function
ccid_initialize_builtins()to the function .exit.text:tfrc_lib_exit() The function__initccid_initialize_builtins()references
a function__exittfrc_lib_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the__exitannotation oftfrc_lib_exit()so it may be used outside an exit section.Signed-off-by Leonardo Potenza <[email protected]>---
Index:linux-2.6/net/dccp/ccids/lib/tfrc.c
=================================> ---linux-2.6.orig/net/dccp/ccids/lib/tfrc.c2009-01-08 19:19:50.000000000 +0100
+++linux-2.6/net/dccp/ccids/lib/tfrc.c2009-01-08 19:20:07.000000000 +0100
Review out: · line 42
Quoted 8 lines
(quoted diff) +1
-1@@ -36,7 +36,7 @@ out: return rc; } -void __exit tfrc_lib_exit(void) +void tfrc_lib_exit(void) { tfrc_rx_packet_history_exit(); tfrc_tx_packet_history_exit();
Thanks Leonardo,
Dave/Gerrit,
Please apply.
Thanks,
- Arnaldo
David Miller
maintainerFrom: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 8 Jan 2009 21:28:47 -0200
Quoted 1 line
Adding netdev to the CC list.
...
Quoted 5 lines
Dave/Gerrit,
Please apply.
I'll take care of this, thanks!
[email protected]
Acked-byQuoted 4 lines
Quoted 2 lines
I'll take care of this, thanks!
Thank you - if it is not too late,
David Miller
maintainerFrom: [email protected]
Date: Sat, 10 Jan 2009 17:24:24 -0000 (GMT)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'll take care of this, thanks!
Thank you - if it is not too late,
Acked-by Gerrit Renker <[email protected]>
Ack added, thanks for the review :)