Skip to content

Commit b2ddeb1

Browse files
holtmannjhedberg
authored andcommitted
Bluetooth: cmtp: Use BIT(x) instead of (1 << x)
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 836a061 commit b2ddeb1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎net/bluetooth/cmtp/capi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)
333333
return;
334334
}
335335

336-
if (session->flags & (1 << CMTP_LOOPBACK)) {
336+
if (session->flags & BIT(CMTP_LOOPBACK)) {
337337
kfree_skb(skb);
338338
return;
339339
}

‎net/bluetooth/cmtp/core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static int cmtp_session(void *arg)
314314

315315
down_write(&cmtp_session_sem);
316316

317-
if (!(session->flags & (1 << CMTP_LOOPBACK)))
317+
if (!(session->flags & BIT(CMTP_LOOPBACK)))
318318
cmtp_detach_device(session);
319319

320320
fput(session->sock->file);
@@ -390,7 +390,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
390390
goto unlink;
391391
}
392392

393-
if (!(session->flags & (1 << CMTP_LOOPBACK))) {
393+
if (!(session->flags & BIT(CMTP_LOOPBACK))) {
394394
err = cmtp_attach_device(session);
395395
if (err < 0) {
396396
atomic_inc(&session->terminate);

0 commit comments

Comments
 (0)