Skip to content

Commit

Permalink
scsi: qla4xxx: Simplify conditional
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

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

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wan Jiabing <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
Wan Jiabing authored and martinkpetersen committed May 10, 2021
1 parent fbdfd51 commit ed26297
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/qla4xxx/ql4_83xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit ed26297

Please sign in to comment.