scsi: dc395x: Use bitwise instead of arithmetic operator for flags
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 9 Mar 2021 03:39:13 +0000 (11:39 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 25 Mar 2021 02:13:01 +0000 (22:13 -0400)
Fix the following coccicheck warnings:

./drivers/scsi/dc395x.c:2921:28-29: WARNING: sum of probable bitmasks,
consider |.

Link: https://lore.kernel.org/r/1615261153-32647-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/dc395x.c

index 5503230006f874a4a735814e7f158e1f3f67cf8b..1e9ec4d8c605a916e47868d466179d5db01ab8f9 100644 (file)
@@ -2918,7 +2918,7 @@ static void disconnect(struct AdapterCtlBlk *acb)
        } else {
                if ((srb->state & (SRB_START_ + SRB_MSGOUT))
                    || !(srb->
-                        state & (SRB_DISCONNECT + SRB_COMPLETED))) {
+                        state & (SRB_DISCONNECT | SRB_COMPLETED))) {
                        /*
                         * Selection time out 
                         * SRB_START_ || SRB_MSGOUT || (!SRB_DISCONNECT && !SRB_COMPLETED)