Skip to contentSkip to conversation

scsi: dc395x: Use bitwise instead of arithmetic operator for flags

PATCH Applied Jiapeng Chong 2 participants 2 messages Mar 9, 2021 – Mar 30, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: dc395x: Use bitwise instead of arithmetic operator for flags

Fix the following coccicheck warnings:

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

---
 drivers/scsi/dc395x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/dc395x.c +1 -1
index 3ea345c1..91362e6 100644
@@ -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)
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 4 lines · Jiapeng Chong

Fix the following coccicheck warnings:

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

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: dc395x: Use bitwise instead of arithmetic operator for flags

      https://git.kernel.org/mkp/scsi/c/973c920811bc
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering