diff options
author | Syam Sidhardhan <s.syam@samsung.com> | 2012-10-29 13:07:36 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-01 18:27:04 -0400 |
commit | 612dfce9fbd2e564bcd656d4b7f7fa7d72966c47 (patch) | |
tree | d3ce3f894e1bab8dcb8ae591ea1ccc8517a5cf75 | |
parent | 258c4ed076387fc900ea52869eab9b7ee67ce864 (diff) |
Bluetooth: mgmt: Use __constant when dealing with constants
__constant_cpu_to_le*() is the right go here.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | net/bluetooth/mgmt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 1a304e2d5a74..a1a62baaaafb 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -222,7 +222,7 @@ static int cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status) | |||
222 | 222 | ||
223 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | 223 | hdr = (void *) skb_put(skb, sizeof(*hdr)); |
224 | 224 | ||
225 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_STATUS); | 225 | hdr->opcode = __constant_cpu_to_le16(MGMT_EV_CMD_STATUS); |
226 | hdr->index = cpu_to_le16(index); | 226 | hdr->index = cpu_to_le16(index); |
227 | hdr->len = cpu_to_le16(sizeof(*ev)); | 227 | hdr->len = cpu_to_le16(sizeof(*ev)); |
228 | 228 | ||
@@ -253,7 +253,7 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status, | |||
253 | 253 | ||
254 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | 254 | hdr = (void *) skb_put(skb, sizeof(*hdr)); |
255 | 255 | ||
256 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_COMPLETE); | 256 | hdr->opcode = __constant_cpu_to_le16(MGMT_EV_CMD_COMPLETE); |
257 | hdr->index = cpu_to_le16(index); | 257 | hdr->index = cpu_to_le16(index); |
258 | hdr->len = cpu_to_le16(sizeof(*ev) + rp_len); | 258 | hdr->len = cpu_to_le16(sizeof(*ev) + rp_len); |
259 | 259 | ||
@@ -832,7 +832,7 @@ static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 data_len, | |||
832 | if (hdev) | 832 | if (hdev) |
833 | hdr->index = cpu_to_le16(hdev->id); | 833 | hdr->index = cpu_to_le16(hdev->id); |
834 | else | 834 | else |
835 | hdr->index = cpu_to_le16(MGMT_INDEX_NONE); | 835 | hdr->index = __constant_cpu_to_le16(MGMT_INDEX_NONE); |
836 | hdr->len = cpu_to_le16(data_len); | 836 | hdr->len = cpu_to_le16(data_len); |
837 | 837 | ||
838 | if (data) | 838 | if (data) |
@@ -3622,9 +3622,9 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
3622 | ev->addr.type = link_to_bdaddr(link_type, addr_type); | 3622 | ev->addr.type = link_to_bdaddr(link_type, addr_type); |
3623 | ev->rssi = rssi; | 3623 | ev->rssi = rssi; |
3624 | if (cfm_name) | 3624 | if (cfm_name) |
3625 | ev->flags |= cpu_to_le32(MGMT_DEV_FOUND_CONFIRM_NAME); | 3625 | ev->flags |= __constant_cpu_to_le32(MGMT_DEV_FOUND_CONFIRM_NAME); |
3626 | if (!ssp) | 3626 | if (!ssp) |
3627 | ev->flags |= cpu_to_le32(MGMT_DEV_FOUND_LEGACY_PAIRING); | 3627 | ev->flags |= __constant_cpu_to_le32(MGMT_DEV_FOUND_LEGACY_PAIRING); |
3628 | 3628 | ||
3629 | if (eir_len > 0) | 3629 | if (eir_len > 0) |
3630 | memcpy(ev->eir, eir, eir_len); | 3630 | memcpy(ev->eir, eir, eir_len); |