diff mbox series

scsi/qla4xxx: Simplify the calculation of variables

Message ID 1611642948-43192-1-git-send-email-abaci-bugfix@linux.alibaba.com (mailing list archive)
State Deferred
Headers show
Series scsi/qla4xxx: Simplify the calculation of variables | expand

Commit Message

Abaci Team Jan. 26, 2021, 6:35 a.m. UTC
Fix the following coccicheck warnings:

./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is
equivalent to !A || B.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
 drivers/scsi/qla4xxx/ql4_83xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
index 5f56122..64244a6 100644
--- a/drivers/scsi/qla4xxx/ql4_83xx.c
+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
@@ -471,9 +471,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)))
+				if (!iscsi_present || (iscsi_func_low > device_map[i].func_num))
 					iscsi_func_low = device_map[i].func_num;
 
 				iscsi_present++;