[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210820060550.14285-1-jing.yangyang@zte.com.cn>
Date: Thu, 19 Aug 2021 23:05:50 -0700
From: CGEL <cgel.zte@...il.com>
To: linux-kernel@...r.kernel.org
Cc: jing yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] firmware: edd: fix Coccinelle warnings
From: jing yangyang <jing.yangyang@....com.cn>
WARNING !A || A && B is equivalent to !A || B
This issue was detected with the help of Coccinelle.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
---
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