lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1611642948-43192-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date:   Tue, 26 Jan 2021 14:35:48 +0800
From:   Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
To:     njavali@...vell.com
Cc:     mrangankar@...vell.com, GR-QLogic-Storage-Upstream@...vell.com,
        jejb@...ux.ibm.com, martin.petersen@...cle.com,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] 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.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ