Skip to contentSkip to conversation

Bluetooth: hidp: Use BIT(x) instead of (1 << x)

PATCH In review Marcel Holtmann 1 participant 1 message Apr 3, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 2/2 Bluetooth: hidp: Use BIT(x) instead of (1 << x)

---
 net/bluetooth/hidp/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/hidp/core.c +2 -2
index 926a0e8b7136..a05b9dbf14c9 100644
@@ -908,7 +908,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr,
 	kref_init(&session->ref);
 	atomic_set(&session->state, HIDP_SESSION_IDLING);
 	init_waitqueue_head(&session->state_queue);
-	session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
+	session->flags = req->flags & BIT(HIDP_BLUETOOTH_VENDOR_ID);
 
 	/* connection management */
 	bacpy(&session->bdaddr, bdaddr);
@@ -1366,7 +1366,7 @@ int hidp_connection_del(struct hidp_conndel_req *req)
 	if (!session)
 		return -ENOENT;
 
-	if (req->flags & (1 << HIDP_VIRTUAL_CABLE_UNPLUG))
+	if (req->flags & BIT(HIDP_VIRTUAL_CABLE_UNPLUG))
 		hidp_send_ctrl_message(session,
 				       HIDP_TRANS_HID_CONTROL |
 				         HIDP_CTRL_VIRTUAL_CABLE_UNPLUG,
Signature · 1 line
2.1.0