[PATCH linux-next] scsi/ncr53c8xx: Use bitwise instead of arithmetic operator for flags

From: CGEL
Date: Thu Aug 19 2021 - 23:12:50 EST


From: jing yangyang <jing.yangyang@xxxxxxxxxx>

This silences the following coccinelle warning:

"WARNING: sum of probable bitmasks, consider |"

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: jing yangyang <jing.yangyang@xxxxxxxxxx>
---
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