Message ID | 1615261153-32647-1-git-send-email-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers | show |
Series | scsi: dc395x: Use bitwise instead of arithmetic operator for flags | expand |
On Tue, 9 Mar 2021 11:39:13 +0800, Jiapeng Chong wrote: > 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 -- Martin K. Petersen Oracle Linux Engineering
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 3ea345c1..91362e6 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -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)
Fix the following coccicheck warnings: ./drivers/scsi/dc395x.c:2921:28-29: WARNING: sum of probable bitmasks, consider |. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- drivers/scsi/dc395x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)