All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bluetooth-next] Bluetooth: fix sco_exit compile warning
@ 2015-03-07 19:52 Alexander Aring
  2015-03-07 20:14 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Aring @ 2015-03-07 19:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: kernel, Alexander Aring, Johan Hedberg

While compiling the following warning occurs:

WARNING: net/built-in.o(.init.text+0x602c): Section mismatch in
reference from the function bt_init() to the function
.exit.text:sco_exit()
The function __init bt_init() references
a function __exit sco_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 of
sco_exit() so it may be used outside an exit section.

Since commit 6d785aa345f525e1fdf098b7c590168f0b00f3f1 ("Bluetooth:
Convert mgmt to use HCI chan registration API") the function "sco_exit"
is used inside of function "bt_init". The suggested solution by remove
the __exit annotation solved this issue.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Cc: Johan Hedberg <johan.hedberg@intel.com>
---
I don't have any working bluetooth setup here, just compile tested.

 net/bluetooth/sco.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 54279ac..4322c83 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -1231,7 +1231,7 @@ error:
 	return err;
 }
 
-void __exit sco_exit(void)
+void sco_exit(void)
 {
 	bt_procfs_cleanup(&init_net, "sco");
 
-- 
2.3.0


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

* Re: [PATCH bluetooth-next] Bluetooth: fix sco_exit compile warning
  2015-03-07 19:52 [PATCH bluetooth-next] Bluetooth: fix sco_exit compile warning Alexander Aring
@ 2015-03-07 20:14 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2015-03-07 20:14 UTC (permalink / raw)
  To: Alexander Aring; +Cc: linux-bluetooth, kernel

Hi Alex,

On Sat, Mar 07, 2015, Alexander Aring wrote:
> While compiling the following warning occurs:
> 
> WARNING: net/built-in.o(.init.text+0x602c): Section mismatch in
> reference from the function bt_init() to the function
> .exit.text:sco_exit()
> The function __init bt_init() references
> a function __exit sco_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 of
> sco_exit() so it may be used outside an exit section.
> 
> Since commit 6d785aa345f525e1fdf098b7c590168f0b00f3f1 ("Bluetooth:
> Convert mgmt to use HCI chan registration API") the function "sco_exit"
> is used inside of function "bt_init". The suggested solution by remove
> the __exit annotation solved this issue.
> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> Cc: Johan Hedberg <johan.hedberg@intel.com>
> ---
> I don't have any working bluetooth setup here, just compile tested.
> 
>  net/bluetooth/sco.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to bluetooth-next. Thanks.

Johan

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

end of thread, other threads:[~2015-03-07 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-07 19:52 [PATCH bluetooth-next] Bluetooth: fix sco_exit compile warning Alexander Aring
2015-03-07 20:14 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.