[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1612319190-111421-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Wed, 3 Feb 2021 10:26:30 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: njavali@...vell.com
Cc: GR-QLogic-Storage-Upstream@...vell.com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] scsi: qla2xxx: Simplify the calculation of variables
Fix the following coccicheck warnings:
./drivers/scsi/qla2xxx/qla_target.c:984:12-14: WARNING !A || A && B is
equivalent to !A || B.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
drivers/scsi/qla2xxx/qla_target.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 0d09480..c48daf5 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -981,8 +981,7 @@ void qlt_free_session_done(struct work_struct *work)
int rc;
if (!own ||
- (own &&
- (own->iocb.u.isp24.status_subcode == ELS_PLOGI))) {
+ (own->iocb.u.isp24.status_subcode == ELS_PLOGI)) {
rc = qla2x00_post_async_logout_work(vha, sess,
NULL);
if (rc != QLA_SUCCESS)
--
1.8.3.1
Powered by blists - more mailing lists