[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210820031235.12535-1-jing.yangyang@zte.com.cn>
Date: Thu, 19 Aug 2021 20:12:35 -0700
From: CGEL <cgel.zte@...il.com>
To: "James E . J . Bottomley" <jejb@...ux.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
jing yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] scsi/ncr53c8xx: Use bitwise instead of arithmetic operator for flags
From: jing yangyang <jing.yangyang@....com.cn>
This silences the following coccinelle warning:
"WARNING: sum of probable bitmasks, consider |"
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
---
drivers/scsi/ncr53c8xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 09958f7..5c27afb 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -7910,7 +7910,7 @@ static void __init ncr_getclock (struct ncb *np, int mult)
/*
** True with 875 or 895 with clock multiplier selected
*/
- if (mult > 1 && (stest1 & (DBLEN+DBLSEL)) == DBLEN+DBLSEL) {
+ if (mult > 1 && (stest1 & (DBLEN | DBLSEL)) == DBLEN | DBLSEL) {
if (bootverbose >= 2)
printk ("%s: clock multiplier found\n", ncr_name(np));
np->multiplier = mult;
--
1.8.3.1
Powered by blists - more mailing lists