linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix extra conversion to __le32
@ 2012-03-09 11:00 Andrei Emeltchenko
  2012-03-09 12:41 ` Gustavo Padovan
  2012-03-09 17:06 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2012-03-09 11:00 UTC (permalink / raw)
  To: linux-bluetooth

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

Value to be converted is already in __le32 format.

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

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 7fcff88..97b5b6c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3107,7 +3107,7 @@ int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr,
 	bacpy(&ev.addr.bdaddr, bdaddr);
 	ev.addr.type = link_to_mgmt(link_type, addr_type);
 	ev.confirm_hint = confirm_hint;
-	put_unaligned_le32(value, &ev.value);
+	ev.value = value;
 
 	return mgmt_event(MGMT_EV_USER_CONFIRM_REQUEST, hdev, &ev, sizeof(ev),
 			  NULL);
-- 
1.7.9


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

* Re: [PATCH] Bluetooth: Fix extra conversion to __le32
  2012-03-09 11:00 [PATCH] Bluetooth: Fix extra conversion to __le32 Andrei Emeltchenko
@ 2012-03-09 12:41 ` Gustavo Padovan
  2012-03-09 17:06 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2012-03-09 12:41 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-03-09 13:00:50 +0200]:

> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> Value to be converted is already in __le32 format.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  net/bluetooth/mgmt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

	Gustavo

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

* Re: [PATCH] Bluetooth: Fix extra conversion to __le32
  2012-03-09 11:00 [PATCH] Bluetooth: Fix extra conversion to __le32 Andrei Emeltchenko
  2012-03-09 12:41 ` Gustavo Padovan
@ 2012-03-09 17:06 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2012-03-09 17:06 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

> Value to be converted is already in __le32 format.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  net/bluetooth/mgmt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 7fcff88..97b5b6c 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -3107,7 +3107,7 @@ int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr,
>  	bacpy(&ev.addr.bdaddr, bdaddr);
>  	ev.addr.type = link_to_mgmt(link_type, addr_type);
>  	ev.confirm_hint = confirm_hint;
> -	put_unaligned_le32(value, &ev.value);
> +	ev.value = value;

actually we do not need put_unaligned_le32 anyway here since the struct
itself is already __packed. So you might wanna go through the code and
fix these up as well.

Regards

Marcel



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

end of thread, other threads:[~2012-03-09 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 11:00 [PATCH] Bluetooth: Fix extra conversion to __le32 Andrei Emeltchenko
2012-03-09 12:41 ` Gustavo Padovan
2012-03-09 17:06 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).