[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210414121726.12503-1-wanjiabing@vivo.com>
Date: Wed, 14 Apr 2021 20:17:26 +0800
From: Wan Jiabing <wanjiabing@...o.com>
To: Nilesh Javali <njavali@...vell.com>,
Manish Rangankar <mrangankar@...vell.com>,
GR-QLogic-Storage-Upstream@...vell.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: kael_w@...h.net, Wan Jiabing <wanjiabing@...o.com>
Subject: [PATCH] scsi: qla4xxx: Simplify judgement condition
Fix the following coccicheck warning:
./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is
equivalent to !A || B
Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
---
drivers/scsi/qla4xxx/ql4_83xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
index 5f56122f6664..db41d90a5b6e 100644
--- a/drivers/scsi/qla4xxx/ql4_83xx.c
+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
@@ -472,8 +472,7 @@ int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha)
} else if (device_map[i].device_type == ISCSI_CLASS) {
if (drv_active & (1 << device_map[i].func_num)) {
if (!iscsi_present ||
- (iscsi_present &&
- (iscsi_func_low > device_map[i].func_num)))
+ iscsi_func_low > device_map[i].func_num)
iscsi_func_low = device_map[i].func_num;
iscsi_present++;
--
2.25.1
Powered by blists - more mailing lists