Bluetooth: cmtp: Use BIT(x) instead of (1 << x)
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 3 Apr 2015 18:02:09 +0000 (11:02 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 4 Apr 2015 05:50:20 +0000 (08:50 +0300)
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/cmtp/capi.c
net/bluetooth/cmtp/core.c

index 75bd2c42e3e791024abf9d4014fbc41d12dea0da..b0c6c6af76ef07c311ea940d482b3d45ab83696d 100644 (file)
@@ -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;
        }
index ddbc348c9dfff03cc6ce82e4af7d2b66f271864d..298ed37010e691a6f2bb72c506b6e50f9e8676f9 100644 (file)
@@ -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);
@@ -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);