* [PATCH] scsi/qla4xxx: Simplify the calculation of variables
@ 2021-01-26 6:35 Jiapeng Zhong
0 siblings, 0 replies; only message in thread
From: Jiapeng Zhong @ 2021-01-26 6:35 UTC (permalink / raw)
To: njavali
Cc: mrangankar, GR-QLogic-Storage-Upstream, jejb, martin.petersen,
linux-scsi, linux-kernel, Jiapeng Zhong
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 --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++;
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-26 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 6:35 [PATCH] scsi/qla4xxx: Simplify the calculation of variables Jiapeng Zhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®