Skip to contentSkip to conversation

scsi/qla4xxx: Simplify the calculation of variables

PATCH New Jiapeng Zhong 1 participant 1 message Jan 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi/qla4xxx: Simplify the calculation of variables

Fix the following coccicheck warnings:

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

---
 drivers/scsi/qla4xxx/ql4_83xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/qla4xxx/ql4_83xx.c +1 -3
index 5f56122..64244a6 100644
@@ -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++;
Signature · 1 line
1.8.3.1