net: bluetooth: Fix 'enable_hs' type
Subsystems (2)
PATCH 1/1 net: bluetooth: Fix 'enable_hs' type
Fix the following build warning:
CC [M] net/bluetooth/hci_core.onet/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
@@ -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
@@ -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
Hi Fabio,
Quoted 6 lines
Fix the following build warning:
CC [M]
net/bluetooth/hci_core.onet/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_paraminhci_core.cpasses 'enable_hs' as bool format, so fix this variable definition type.Signed-off-by Fabio Estevam <[email protected]>--- include/net/bluetooth/hci.h | 2 +- net/bluetooth/hci_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Regards
Marcel
Hi Fabio,
Quoted 6 lines · Fabio Estevam
Fix the following build warning:
CC [M]
net/bluetooth/hci_core.onet/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_paraminhci_core.cpasses 'enable_hs' as bool format, so fix this variable definition type.Signed-off-by Fabio Estevam <[email protected]>--- 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
Quoted 3 lines · Johan Hedberg
The patch has been applied to my bluetooth-next tree. Don't you get the same warning for
enable_mgmtandenable_leas 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
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_mgmtandenable_leas well? Those seem to be declared in a similar manner.No, because
enable_mgmtandenable_leare 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
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_mgmtandenable_leas well? Those seem to be declared in a similar manner.No, because
enable_mgmtandenable_leare 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:
Regards,
Fabio Estevam
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_mgmtandenable_leas well? Those seem to be declared in a similar manner.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
No, because
enable_mgmtandenable_leare 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:
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