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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 3 Jun 2020 11:10:26 +0800
From:   David Wu <david.wu@...k-chips.com>
To:     Thierry Reding <thierry.reding@...il.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     Heiko Stuebner <heiko@...ech.de>, linux-pwm@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: rockchip: simplify rockchip_pwm_get_state()

This change is very good, thank you. The code continues from the 
original code(get_state_v1 and get_state_v2), didn’t make any changes at 
that time, and sorry I have not seen linux-rockchip@...ts.infradead.org 
mail recently.

在 2020/6/2 下午8:39, Thierry Reding 写道:
> On Thu, Sep 19, 2019 at 11:17:27AM +0200, Rasmus Villemoes wrote:
>> The way state->enabled is computed is rather convoluted and hard to
>> read - both branches of the if() actually do the exact same thing. So
>> remove the if(), and further simplify "<boolean condition> ? true :
>> false" to "<boolean condition>".
>>
>> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
>> ---
>> I stumbled on this while trying to understand how the pwm subsystem
>> works. This patch is a semantic no-op, but it's also possible that,
>> say, the first branch simply contains a "double negative" so either
>> the != should be == or the "false : true" should be "true : false".
>>
>>   drivers/pwm/pwm-rockchip.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> I've applied this. Irrespective of any feedback David would have this is
> correct and a nice simplification.
> 
> Thierry
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ