* [PATCH] firmware: edd: Remove redundant condition
@ 2022-03-17 10:05 Haowen Bai
2022-03-18 13:15 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Haowen Bai @ 2022-03-17 10:05 UTC (permalink / raw)
To: sudeep.holla, cristian.marussi, ardb, gregkh
Cc: bjorn.andersson, linux-kernel, Haowen Bai
The logic !A || A && B is equivalent to !A || B. so we have
to make code clear.
Signed-off-by: Haowen Bai <baihaowen@meizu.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 69353dd..5cc2389 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -685,8 +685,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);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <tjhedku0cwqypq8pujvusn6i.1647642604045@email.android.com>]
* Re: [PATCH] firmware: edd: Remove redundant condition
[not found] <tjhedku0cwqypq8pujvusn6i.1647642604045@email.android.com>
@ 2022-04-20 17:31 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-04-20 17:31 UTC (permalink / raw)
To: 白浩文
Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, ardb@kernel.org,
bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org
On Fri, Mar 18, 2022 at 10:33:12PM +0000, 白浩文 wrote:
> Dear Greg KH
>
> But the logic here is:
> (!A || (A && B))
> not:
> (!A || A && B)
>
> as you write
>
> No, what I wrote is
>
> the logic here is:
> (!A || (A && B))
> Is the same:
> (!A || B)
That is not what your changelog text says, and I quote:
> > The logic !A || A && B is equivalent to !A || B. so we have
> > to make code clear.
(note, top-posting is horrid and is why we do not do this, please fix
this in the future.)
So can you please fix up your changelog text to be correct and resend
it?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-20 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 10:05 [PATCH] firmware: edd: Remove redundant condition Haowen Bai
2022-03-18 13:15 ` Greg KH
[not found] <tjhedku0cwqypq8pujvusn6i.1647642604045@email.android.com>
2022-04-20 17:31 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.