All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix compile warnings in mgmt
@ 2012-06-18 10:03 Andrei Emeltchenko
  2012-06-19  2:57 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2012-06-18 10:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Commit af7985bf85840e3dc90ba108a679db044f91f00e introduced regression
resulting in complie warnings:

...
net/bluetooth/mgmt.c:3568:27: warning: invalid assignment: |=
net/bluetooth/mgmt.c:3568:27:    left side has type restricted __le32
net/bluetooth/mgmt.c:3568:27:    right side has type int
net/bluetooth/mgmt.c:3570:27: warning: invalid assignment: |=
net/bluetooth/mgmt.c:3570:27:    left side has type restricted __le32
net/bluetooth/mgmt.c:3570:27:    right side has type int
net/bluetooth/mgmt.c:3580:21: warning: cast from restricted __le32
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 net/bluetooth/mgmt.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 461e16d..0238af3 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3565,9 +3565,9 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
 	ev->addr.type = link_to_bdaddr(link_type, addr_type);
 	ev->rssi = rssi;
 	if (cfm_name)
-		ev->flags |= MGMT_DEV_FOUND_CONFIRM_NAME;
+		ev->flags |= cpu_to_le32(MGMT_DEV_FOUND_CONFIRM_NAME);
 	if (!ssp)
-		ev->flags |= MGMT_DEV_FOUND_LEGACY_PAIRING;
+		ev->flags |= cpu_to_le32(MGMT_DEV_FOUND_LEGACY_PAIRING);
 
 	if (eir_len > 0)
 		memcpy(ev->eir, eir, eir_len);
@@ -3577,8 +3577,6 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
 					  dev_class, 3);
 
 	ev->eir_len = cpu_to_le16(eir_len);
-	ev->flags = cpu_to_le32(ev->flags);
-
 	ev_size = sizeof(*ev) + eir_len;
 
 	return mgmt_event(MGMT_EV_DEVICE_FOUND, hdev, ev, ev_size, NULL);
-- 
1.7.9.5


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

* Re: [PATCH] Bluetooth: Fix compile warnings in mgmt
  2012-06-18 10:03 [PATCH] Bluetooth: Fix compile warnings in mgmt Andrei Emeltchenko
@ 2012-06-19  2:57 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-06-19  2:57 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-18 13:03:46 +0300]:

> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> Commit af7985bf85840e3dc90ba108a679db044f91f00e introduced regression
> resulting in complie warnings:
> 
> ...
> net/bluetooth/mgmt.c:3568:27: warning: invalid assignment: |=
> net/bluetooth/mgmt.c:3568:27:    left side has type restricted __le32
> net/bluetooth/mgmt.c:3568:27:    right side has type int
> net/bluetooth/mgmt.c:3570:27: warning: invalid assignment: |=
> net/bluetooth/mgmt.c:3570:27:    left side has type restricted __le32
> net/bluetooth/mgmt.c:3570:27:    right side has type int
> net/bluetooth/mgmt.c:3580:21: warning: cast from restricted __le32
> ...
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  net/bluetooth/mgmt.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo

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

end of thread, other threads:[~2012-06-19  2:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-18 10:03 [PATCH] Bluetooth: Fix compile warnings in mgmt Andrei Emeltchenko
2012-06-19  2:57 ` Gustavo Padovan

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.