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: <1611644011-60253-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date:   Tue, 26 Jan 2021 14:53:31 +0800
From:   Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
To:     tiwai@...e.de
Cc:     linux-kernel@...r.kernel.org,
        Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] edd: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/firmware/edd.c:698:18-20: 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/firmware/edd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index 14d0970..e8b409e 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -694,8 +694,7 @@ static void edd_populate_dir(struct edd_device * edev)
 	int i;
 
 	for (i = 0; (attr = edd_attrs[i]) && !error; i++) {
-		if (!attr->test ||
-		    (attr->test && attr->test(edev)))
+		if (!attr->test || attr->test(edev))
 			error = sysfs_create_file(&edev->kobj,&attr->attr);
 	}
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ