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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Jan 2017 23:15:06 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:     Lukasz Majewski <lukma@...x.de>,
        Thierry Reding <thierry.reding@...il.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Stefan Agner <stefan@...er.ch>, linux-pwm@...r.kernel.org,
        Bhuvanchandra DV <bhuvanchandra.dv@...adex.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Lothar Wassmann <LW@...o-electronics.de>,
        Sascha Hauer <kernel@...gutronix.de>,
        Fabio Estevam <fabio.estevam@....com>,
        Lukasz Majewski <l.majewski@...ess.pl>
Subject: Re: [PATCH v4 07/11] pwm: imx: Provide atomic PWM support for i.MX PWMv2

On Thu, Jan 5, 2017 at 11:19 AM, Boris Brezillon
<boris.brezillon@...e-electrons.com> wrote:
> On Thu, 5 Jan 2017 10:03:47 +0100
> Lukasz Majewski <lukma@...x.de> wrote:
>> >             /*
>> >              * Wait for a free FIFO slot if the PWM is already
>> > enabled, and
>> >              * flush the FIFO if the PWM was disabled and is
>> > about to be
>> >              * enabled.
>> >              */

>> >             if (cstate.enabled) {

if (pwm_is_enabled()) ?

I think it's better to do whatever API provides to be less error prone.

>> >                     imx_pwm_wait_fifo_slot(chip, pwm);
>> >             } else {
>> >                     ret = clk_prepare_enable(imx->clk_per);
>> >                     if (ret)
>> >                             return ret;

>> if (state.enabled && !cstate.enabled)
>>       clk_preapre_enable();
>
> Yep, and that's correct.

!pwm_is_enabled() ?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ