mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] bluetooth rfcomm: fix section mismatch warning
@ 2010-08-02  8:16 Axel Lin
  2010-08-02 17:01 ` Gustavo F. Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-08-02  8:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Gustavo F. Padovan, Marcel Holtmann

Introduced by Commit 2f8362afcd2da8b313ec3cc04a50af19d3592972
( Bluetooth: Add __init and __exit marks to RFCOMM )

WARNING: vmlinux.o(.init.text+0x246d1): Section mismatch in reference from the function rfcomm_init() to the function .exit.text:rfcomm_cleanup_ttys()
The function __init rfcomm_init() references
a function __exit rfcomm_cleanup_ttys().
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 of
rfcomm_cleanup_ttys() so it may be used outside an exit section.

This patch removes the __exit annotation from rfcomm_cleanup_ttys to eliminate the warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 net/bluetooth/rfcomm/tty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 026205c..befc3a5 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -1183,7 +1183,7 @@ int __init rfcomm_init_ttys(void)
 	return 0;
 }
 
-void __exit rfcomm_cleanup_ttys(void)
+void rfcomm_cleanup_ttys(void)
 {
 	tty_unregister_driver(rfcomm_tty_driver);
 	put_tty_driver(rfcomm_tty_driver);
-- 
1.5.4.3




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

* Re: [PATCH] bluetooth rfcomm: fix section mismatch warning
  2010-08-02  8:16 [PATCH] bluetooth rfcomm: fix section mismatch warning Axel Lin
@ 2010-08-02 17:01 ` Gustavo F. Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo F. Padovan @ 2010-08-02 17:01 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Marcel Holtmann

Hi Axel,

* Axel Lin <axel.lin@gmail.com> [2010-08-02 16:16:16 +0800]:

> Introduced by Commit 2f8362afcd2da8b313ec3cc04a50af19d3592972
> ( Bluetooth: Add __init and __exit marks to RFCOMM )
> 
> WARNING: vmlinux.o(.init.text+0x246d1): Section mismatch in reference from the function rfcomm_init() to the function .exit.text:rfcomm_cleanup_ttys()
> The function __init rfcomm_init() references
> a function __exit rfcomm_cleanup_ttys().
> 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 of
> rfcomm_cleanup_ttys() so it may be used outside an exit section.
> 
> This patch removes the __exit annotation from rfcomm_cleanup_ttys to eliminate the warning.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  net/bluetooth/rfcomm/tty.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

We have fixed that already. Thanks anyway. ;)

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

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

end of thread, other threads:[~2010-08-02 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-02  8:16 [PATCH] bluetooth rfcomm: fix section mismatch warning Axel Lin
2010-08-02 17:01 ` Gustavo F. Padovan

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®