[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+I7/QpQYjBXutLf@ubun2204.myguest.virtualbox.org>
Date: Tue, 7 Feb 2023 17:24:37 +0530
From: Deepak R Varma <drv@...lo.com>
To: Michael Reed <mdr@....com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Saurabh Singh Sengar <ssengar@...rosoft.com>,
Praveen Kumar <kumarpraveen@...ux.microsoft.com>,
Deepak R Varma <drv@...lo.com>
Subject: [PATCH] scsi: qla1280: Replace arithmetic addition by bitwise OR
When adding two bit-field mask values, an OR operation offers higher
performance over an arithmetic operation. So, convert such addition to
an OR based expression.
Issue identified using orplus.cocci semantic patch script.
Signed-off-by: Deepak R Varma <drv@...lo.com>
---
drivers/scsi/qla1280.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 1e7f4d138e06..d806beb4ad1c 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3709,7 +3709,7 @@ qla1280_error_entry(struct scsi_qla_host *ha, struct response *pkt,
ha->outstanding_cmds[handle] = NULL;
/* Bad payload or header */
- if (pkt->entry_status & (BIT_3 + BIT_2)) {
+ if (pkt->entry_status & (BIT_3 | BIT_2)) {
/* Bad payload or header, set error status. */
/* CMD_RESULT(sp->cmd) = CS_BAD_PAYLOAD; */
CMD_RESULT(sp->cmd) = DID_ERROR << 16;
--
2.34.1
Powered by blists - more mailing lists