]> git.baikalelectronics.ru Git - kernel.git/commitdiff
libceph: fix "Boolean result is used in bitwise operation" warning
authorIlya Dryomov <idryomov@gmail.com>
Wed, 20 Jan 2021 13:49:07 +0000 (14:49 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 21 Jan 2021 15:49:59 +0000 (16:49 +0100)
This line dates back to 2013, but cppcheck complained because commit
b27c4137ed93 ("libceph: move msgr1 protocol implementation to its own
file") moved it.  Add parenthesis to silence the warning.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/messenger_v1.c

index 04f653b3c89733bba8771d79399af0053243957c..2cb5ffdf071af76a679a0f1cdae2f7b1a13a909d 100644 (file)
@@ -1100,7 +1100,7 @@ static int read_partial_message(struct ceph_connection *con)
                if (ret < 0)
                        return ret;
 
-               BUG_ON(!con->in_msg ^ skip);
+               BUG_ON((!con->in_msg) ^ skip);
                if (skip) {
                        /* skip this message */
                        dout("alloc_msg said skip message\n");