Bluetooth: remove __le16_to_cpu() from u8 var
Subsystems (2)
PATCH 1/1 Bluetooth: remove __le16_to_cpu() from u8 var
From: Gustavo Padovan <[email protected]>
We don't any endianness conversion in a single byte variable.
--- net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_event.c +1 -1
@@ -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,
Signature · 1 line
1.8.1.4
Marcel Holtmann
maintainerHi Gustavo,
Quoted 12 lines
We don't any endianness conversion in a single byte variable.
Signed-off-by Gustavo Padovan <[email protected]>---
net/bluetooth/hci_event.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)net/bluetooth/hci_event.c +0
-0
net/bluetooth/hci_event.c static void hci_cc_read_page_scan_type(struct hci_dev *hdev, · line 645
Quoted 6 lines
net/bluetooth/hci_event.c +1
-1@@ -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
Hi Marcel,
Quoted 16 lines · Marcel Holtmann
Hi Gustavo,
Quoted 14 lines
We don't any endianness conversion in a single byte variable.
Signed-off-by Gustavo Padovan <[email protected]>---
net/bluetooth/hci_event.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)net/bluetooth/hci_event.c +0
-0@@ -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);
Quoted 6 lines
net/bluetooth/hci_event.c static void hci_cc_read_page_scan_type(struct hci_dev *hdev, · line 645
Quoted 4 lines
net/bluetooth/hci_event.c +1
-1if (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