* [PATCH] net: bluetooth: Fix 'enable_hs' type
@ 2012-01-10 20:33 Fabio Estevam
2012-01-10 20:44 ` Marcel Holtmann
2012-01-10 21:00 ` Johan Hedberg
0 siblings, 2 replies; 7+ messages in thread
From: Fabio Estevam @ 2012-01-10 20:33 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, marcel, Fabio Estevam, Fabio Estevam
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
include/net/bluetooth/hci.h | 2 +-
net/bluetooth/hci_core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5b2fed5..00596e8 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1388,6 +1388,6 @@ struct hci_inquiry_req {
};
#define IREQ_CACHE_FLUSH 0x0001
-extern int enable_hs;
+extern bool enable_hs;
#endif /* __HCI_H */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 845da3e..9de9371 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 20:33 [PATCH] net: bluetooth: Fix 'enable_hs' type Fabio Estevam
@ 2012-01-10 20:44 ` Marcel Holtmann
2012-01-10 21:00 ` Johan Hedberg
1 sibling, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2012-01-10 20:44 UTC (permalink / raw)
To: Fabio Estevam; +Cc: linux-bluetooth, padovan, Fabio Estevam
Hi Fabio,
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> include/net/bluetooth/hci.h | 2 +-
> net/bluetooth/hci_core.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 20:33 [PATCH] net: bluetooth: Fix 'enable_hs' type Fabio Estevam
2012-01-10 20:44 ` Marcel Holtmann
@ 2012-01-10 21:00 ` Johan Hedberg
2012-01-10 21:08 ` Fabio Estevam
1 sibling, 1 reply; 7+ messages in thread
From: Johan Hedberg @ 2012-01-10 21:00 UTC (permalink / raw)
To: Fabio Estevam; +Cc: linux-bluetooth, padovan, marcel, Fabio Estevam
Hi Fabio,
On Tue, Jan 10, 2012, Fabio Estevam wrote:
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 21:00 ` Johan Hedberg
@ 2012-01-10 21:08 ` Fabio Estevam
2012-01-10 21:31 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2012-01-10 21:08 UTC (permalink / raw)
To: Fabio Estevam, linux-bluetooth, padovan, marcel, Fabio Estevam
On Tue, Jan 10, 2012 at 7:00 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 21:08 ` Fabio Estevam
@ 2012-01-10 21:31 ` Johan Hedberg
2012-01-10 22:21 ` Fabio Estevam
0 siblings, 1 reply; 7+ messages in thread
From: Johan Hedberg @ 2012-01-10 21:31 UTC (permalink / raw)
To: Fabio Estevam; +Cc: linux-bluetooth, padovan, marcel, Fabio Estevam
Hi Fabio,
On Tue, Jan 10, 2012, Fabio Estevam wrote:
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 21:31 ` Johan Hedberg
@ 2012-01-10 22:21 ` Fabio Estevam
2012-01-10 22:48 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2012-01-10 22:21 UTC (permalink / raw)
To: Fabio Estevam, linux-bluetooth, padovan, marcel, Fabio Estevam
Hi Johan,
On Tue, Jan 10, 2012 at 7:31 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Fabio,
>
> On Tue, Jan 10, 2012, Fabio Estevam wrote:
>> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: bluetooth: Fix 'enable_hs' type
2012-01-10 22:21 ` Fabio Estevam
@ 2012-01-10 22:48 ` Johan Hedberg
0 siblings, 0 replies; 7+ messages in thread
From: Johan Hedberg @ 2012-01-10 22:48 UTC (permalink / raw)
To: Fabio Estevam; +Cc: linux-bluetooth, padovan, marcel, Fabio Estevam
Hi Fabio,
On Tue, Jan 10, 2012, Fabio Estevam wrote:
> Hi Johan,
>
> On Tue, Jan 10, 2012 at 7:31 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> > Hi Fabio,
> >
> > On Tue, Jan 10, 2012, Fabio Estevam wrote:
> >> > 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
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-10 22:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 20:33 [PATCH] net: bluetooth: Fix 'enable_hs' type Fabio Estevam
2012-01-10 20:44 ` Marcel Holtmann
2012-01-10 21:00 ` Johan Hedberg
2012-01-10 21:08 ` Fabio Estevam
2012-01-10 21:31 ` Johan Hedberg
2012-01-10 22:21 ` Fabio Estevam
2012-01-10 22:48 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox