Skip to contentSkip to conversation

Bluetooth: Use BIT(n) macro instead of manually encoding (1 << n)

PATCH In review Marcel Holtmann 1 participant 1 message Mar 15, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v3 14/14 Bluetooth: Use BIT(n) macro instead of manually encoding (1 << n)

The flags for the management command table used manual encoding of bits in the form of (1 << n). It is however preferred to use BIT(n) macro instead.

---
 include/net/bluetooth/hci_core.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/hci_core.h +4 -4
index 3546789c1616..ce94bcb33600 100644
@@ -1289,10 +1289,10 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb);
 
 void hci_sock_dev_event(struct hci_dev *hdev, int event);
 
-#define HCI_MGMT_VAR_LEN	(1 << 0)
-#define HCI_MGMT_NO_HDEV	(1 << 1)
-#define HCI_MGMT_UNTRUSTED	(1 << 2)
-#define HCI_MGMT_UNCONFIGURED	(1 << 3)
+#define HCI_MGMT_VAR_LEN	BIT(0)
+#define HCI_MGMT_NO_HDEV	BIT(1)
+#define HCI_MGMT_UNTRUSTED	BIT(2)
+#define HCI_MGMT_UNCONFIGURED	BIT(3)
 
 struct hci_mgmt_handler {
 	int (*func) (struct sock *sk, struct hci_dev *hdev, void *data,
Signature · 1 line
2.1.0