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]
Message-ID: <CAGngYiUc5_A1umM=8f12BLejq-3aqHnExEQ2RxNABv8u3HdqnA@mail.gmail.com>
Date:   Tue, 4 Jun 2019 09:34:46 -0400
From:   Sven Van Asbroeck <thesven73@...il.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        linux-pwm@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH] pwm: pca9685: fix pwm/gpio inter-operation

Thank you for the review, Mika ! See comments below.

On Tue, Jun 4, 2019 at 5:14 AM Mika Westerberg
<mika.westerberg@...ux.intel.com> wrote:
>
> > This approach will also prevent the request of the "all" pwm channel, if any
> > other pwm channel is already in use. Is this correct behaviour?
>
> Sounds correct to me.

Something that occurred to me right after I pressed the send button:

This patch will prevent a pwm 'all channels' request if at least one
of the pwm's is in use. But it will not guard against the opposite:
after the 'all channels' pwm is requested, it will still allow requests
for other pwms/gpios !

This is identical to the old behaviour. But maybe this is an oversight
and not a feature?

Proposal:
1. prevent request of 'all channel' if any of the pwms/gpios are in use
2. prevent request of all other pwms/gpios if 'all channels' is in use

>
> Can we call it pca9685_pwm_test_and_set_inuse() following naming of
> test_and_set_bit()?

Sounds good to me.

> >
> > +static void pca9685_pwm_clear_inuse(struct pca9685 *pca, struct pwm_device *pwm)
>
> I think it might be better if you provide __pca9685_pwm_clear_inuse()
> that does not take the lock and then pca9685_pwm_clear_inuse() that just
> calls the former. Then ->

I agree, this is much cleaner.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ