All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: remove __le16_to_cpu() from u8 var
@ 2013-03-18 17:52 Gustavo Padovan
  2013-03-18 18:26 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Padovan @ 2013-03-18 17:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

We don't any endianness conversion in a single byte variable.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8a1f511..1385807 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -641,7 +641,7 @@ static void hci_cc_read_page_scan_type(struct hci_dev *hdev,
 	BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
 
 	if (test_bit(HCI_INIT, &hdev->flags) && !rp->status)
-		hdev->page_scan_type = __le16_to_cpu(rp->type);
+		hdev->page_scan_type = rp->type;
 }
 
 static void hci_cc_write_page_scan_type(struct hci_dev *hdev,
-- 
1.8.1.4


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

* Re: [PATCH] Bluetooth: remove __le16_to_cpu() from u8 var
  2013-03-18 17:52 [PATCH] Bluetooth: remove __le16_to_cpu() from u8 var Gustavo Padovan
@ 2013-03-18 18:26 ` Marcel Holtmann
  2013-03-18 18:41   ` Gustavo Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2013-03-18 18:26 UTC (permalink / raw)
  To: Gustavo Padovan; +Cc: linux-bluetooth, Gustavo Padovan

Hi Gustavo,

> We don't any endianness conversion in a single byte variable.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> net/bluetooth/hci_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 8a1f511..1385807 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -641,7 +641,7 @@ static void hci_cc_read_page_scan_type(struct hci_dev *hdev,
> 	BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
> 
> 	if (test_bit(HCI_INIT, &hdev->flags) && !rp->status)
> -		hdev->page_scan_type = __le16_to_cpu(rp->type);
> +		hdev->page_scan_type = rp->type;
> }

we could also just fix up the patch with this mistake. Since it has not gotten into wireless-next yet.

Regards

Marcel


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

* Re: [PATCH] Bluetooth: remove __le16_to_cpu() from u8 var
  2013-03-18 18:26 ` Marcel Holtmann
@ 2013-03-18 18:41   ` Gustavo Padovan
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2013-03-18 18:41 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth, Gustavo Padovan

Hi Marcel,

* Marcel Holtmann <marcel@holtmann.org> [2013-03-18 11:26:59 -0700]:

> Hi Gustavo,
> 
> > We don't any endianness conversion in a single byte variable.
> > 
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> > net/bluetooth/hci_event.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> > index 8a1f511..1385807 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -641,7 +641,7 @@ static void hci_cc_read_page_scan_type(struct hci_dev *hdev,
> > 	BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
> > 
> > 	if (test_bit(HCI_INIT, &hdev->flags) && !rp->status)
> > -		hdev->page_scan_type = __le16_to_cpu(rp->type);
> > +		hdev->page_scan_type = rp->type;
> > }
> 
> we could also just fix up the patch with this mistake. Since it has not gotten into wireless-next yet.

Yes, the broken patch is now fixed in bluetooth-next.

	Gustavo

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

end of thread, other threads:[~2013-03-18 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 17:52 [PATCH] Bluetooth: remove __le16_to_cpu() from u8 var Gustavo Padovan
2013-03-18 18:26 ` Marcel Holtmann
2013-03-18 18:41   ` 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.