linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: dc395x: Use bitwise instead of arithmetic operator for flags
@ 2021-11-24  3:23 cgel.zte
  0 siblings, 0 replies; 3+ messages in thread
From: cgel.zte @ 2021-11-24  3:23 UTC (permalink / raw)
  To: oliver
  Cc: aliakc, lenehan, jejb, martin.petersen, dc395x, linux-scsi,
	linux-kernel, Changcheng Deng, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Fix the following coccicheck warnings:
./drivers/scsi/dc395x.c: 1129: sum of probable bitmasks, consider |

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 drivers/scsi/dc395x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 9b8796c9e634..854236d550e8 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -1126,7 +1126,7 @@ static void reset_dev_param(struct AdapterCtlBlk *acb)
 	list_for_each_entry(dcb, &acb->dcb_list, list) {
 		u8 period_index;
 
-		dcb->sync_mode &= ~(SYNC_NEGO_DONE + WIDE_NEGO_DONE);
+		dcb->sync_mode &= ~(SYNC_NEGO_DONE | WIDE_NEGO_DONE);
 		dcb->sync_period = 0;
 		dcb->sync_offset = 0;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: dc395x: Use bitwise instead of arithmetic operator for flags
  2021-03-09  3:39 Jiapeng Chong
@ 2021-03-30  3:54 ` Martin K. Petersen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-03-30  3:54 UTC (permalink / raw)
  To: oliver, Jiapeng Chong
  Cc: Martin K . Petersen, lenehan, aliakc, linux-kernel, linux-scsi,
	jejb, dc395x

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] scsi: dc395x: Use bitwise instead of arithmetic operator for flags
@ 2021-03-09  3:39 Jiapeng Chong
  2021-03-30  3:54 ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2021-03-09  3:39 UTC (permalink / raw)
  To: oliver
  Cc: aliakc, lenehan, jejb, martin.petersen, dc395x, linux-scsi,
	linux-kernel, Jiapeng Chong

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(-)

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)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-24  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  3:23 [PATCH] scsi: dc395x: Use bitwise instead of arithmetic operator for flags cgel.zte
  -- strict thread matches above, loose matches on Subject: below --
2021-03-09  3:39 Jiapeng Chong
2021-03-30  3:54 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).