2012-03-09 09:59:15

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] Bluetooth: trivial: Correct endian conversion

From: Andrei Emeltchenko <[email protected]>

Correct endian conversion reported by sparse

Signed-off-by: Andrei Emeltchenko <[email protected]>
---
net/bluetooth/hci_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index ad50b76..306451d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3388,7 +3388,7 @@ static inline void hci_le_ltk_request_evt(struct hci_dev *hdev,
struct hci_conn *conn;
struct smp_ltk *ltk;

- BT_DBG("%s handle %d", hdev->name, cpu_to_le16(ev->handle));
+ BT_DBG("%s handle %d", hdev->name, __le16_to_cpu(ev->handle));

hci_dev_lock(hdev);

--
1.7.9



2012-03-09 12:38:23

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: trivial: Correct endian conversion

Hi Andrei,

* Andrei Emeltchenko <[email protected]> [2012-03-09 11:59:15 +0200]:

> From: Andrei Emeltchenko <[email protected]>
>
> Correct endian conversion reported by sparse
>
> Signed-off-by: Andrei Emeltchenko <[email protected]>
> ---
> net/bluetooth/hci_event.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Gustavo