Skip to contentSkip to conversation

net: bluetooth: Fix 'enable_hs' type

PATCH In review Fabio Estevam 3 participants 7 messages Jan 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bluetooth: Fix 'enable_hs' type

Fix the following build warning:

CC [M] net/bluetooth/hci_core.o
net/bluetooth/hci_core.c: In function ‘__check_enable_hs’:
net/bluetooth/hci_core.c:2587: warning: return from incompatible pointer type

module_param in hci_core.c passes 'enable_hs' as bool format, so fix this variable definition type.

---
 include/net/bluetooth/hci.h |    2 +-
 net/bluetooth/hci_core.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/net/bluetooth/hci.h +1 -1
index 5b2fed5..00596e8 100644
@@ -1388,6 +1388,6 @@ struct hci_inquiry_req {
 };
 #define IREQ_CACHE_FLUSH 0x0001
 
-extern int enable_hs;
+extern bool enable_hs;
 
 #endif /* __HCI_H */
net/bluetooth/hci_core.c +1 -1
index 845da3e..9de9371 100644
@@ -55,7 +55,7 @@
 
 #define AUTO_OFF_TIMEOUT 2000
 
-int enable_hs;
+bool enable_hs;
 
 static void hci_rx_work(struct work_struct *work);
 static void hci_cmd_work(struct work_struct *work);
Signature · 1 line
1.7.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Fabio,

Quoted 6 lines

Fix the following build warning:

CC [M] net/bluetooth/hci_core.o
net/bluetooth/hci_core.c: In function ‘__check_enable_hs’:
net/bluetooth/hci_core.c:2587: warning: return from incompatible pointer type

Quoted 7 lines

module_param in hci_core.c passes 'enable_hs' as bool format, so fix this variable definition type.

---
 include/net/bluetooth/hci.h |    2 +-
 net/bluetooth/hci_core.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Regards

Marcel

#2 lore raw
In reply to Fabio Estevam

Hi Fabio,

Quoted 6 lines · Fabio Estevam

Fix the following build warning:

CC [M] net/bluetooth/hci_core.o
net/bluetooth/hci_core.c: In function ‘__check_enable_hs’:
net/bluetooth/hci_core.c:2587: warning: return from incompatible pointer type

Quoted 7 lines

module_param in hci_core.c passes 'enable_hs' as bool format, so fix this variable definition type.

---
 include/net/bluetooth/hci.h |    2 +-
 net/bluetooth/hci_core.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

The patch has been applied to my bluetooth-next tree. Don't you get the same warning for enable_mgmt and enable_le as well? Those seem to be declared in a similar manner.

Johan

#3 lore raw
Quoted 3 lines · Johan Hedberg

The patch has been applied to my bluetooth-next tree. Don't you get the same warning for enable_mgmt and enable_le as well? Those seem to be declared in a similar manner.

No, because enable_mgmt and enable_le are already declared as 'bool'.

Regards,

Fabio Estevam

#4 lore raw

Hi Fabio,

Quoted 5 lines · Fabio Estevam
Quoted 3 lines

The patch has been applied to my bluetooth-next tree. Don't you get the same warning for enable_mgmt and enable_le as well? Those seem to be declared in a similar manner.

No, because enable_mgmt and enable_le are already declared as 'bool'.

I don't know what tree you're looking at but at least in mine they're both "static int".

Johan

#5 lore raw

Hi Johan,

Quoted 11 lines · Johan Hedberg

Hi Fabio,

Quoted 5 lines · Fabio Estevam
Quoted 3 lines

The patch has been applied to my bluetooth-next tree. Don't you get the same warning for enable_mgmt and enable_le as well? Those seem to be declared in a similar manner.

No, because enable_mgmt and enable_le are already declared as 'bool'.

I don't know what tree you're looking at but at least in mine they're both "static int".

I am using linux-next. Please check:

http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next-history.git&a=search&h=refs%2Fheads%2Fmaster&st=grep&s=enable_mgmt

Regards,

Fabio Estevam

#6 lore raw

Hi Fabio,

Quoted 10 lines · Fabio Estevam

Hi Johan,

Quoted 7 lines · Johan Hedberg

Hi Fabio,

Quoted 4 lines · Fabio Estevam
Quoted 3 lines

The patch has been applied to my bluetooth-next tree. Don't you get the same warning for enable_mgmt and enable_le as well? Those seem to be declared in a similar manner.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

No, because enable_mgmt and enable_le are already declared as 'bool'.

I don't know what tree you're looking at but at least in mine they're both "static int".

I am using linux-next. Please check:

http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next-history.git&a=search&h=refs%2Fheads%2Fmaster&st=grep&s=enable_mgmt

Yep, seems commit eb939922 from Rusty Russel took care of this, but the commit has not yet made it to the bluetooth-next tree.

Johan