Skip to content

Commit

Permalink
Bluetooth: cmtp: Use BIT(x) instead of (1 << x)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Apr 4, 2015
1 parent 836a061 commit b2ddeb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/bluetooth/cmtp/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)
return;
}

if (session->flags & (1 << CMTP_LOOPBACK)) {
if (session->flags & BIT(CMTP_LOOPBACK)) {
kfree_skb(skb);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions net/bluetooth/cmtp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int cmtp_session(void *arg)

down_write(&cmtp_session_sem);

if (!(session->flags & (1 << CMTP_LOOPBACK)))
if (!(session->flags & BIT(CMTP_LOOPBACK)))
cmtp_detach_device(session);

fput(session->sock->file);
Expand Down Expand Up @@ -390,7 +390,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
goto unlink;
}

if (!(session->flags & (1 << CMTP_LOOPBACK))) {
if (!(session->flags & BIT(CMTP_LOOPBACK))) {
err = cmtp_attach_device(session);
if (err < 0) {
atomic_inc(&session->terminate);
Expand Down

0 comments on commit b2ddeb1

Please sign in to comment.