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: <20170327181320.wfee7b4mptdrywy5@sirena.org.uk>
Date:   Mon, 27 Mar 2017 19:13:20 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Javier Martinez Canillas <javier@....samsung.com>
Cc:     Matthias Kaehlcke <mka@...omium.org>,
        Brian Norris <briannorris@...omium.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH] regulator: core: Limit propagation of parent voltage
 count and list

On Mon, Mar 27, 2017 at 01:54:50PM -0400, Javier Martinez Canillas wrote:
> On 03/27/2017 01:39 PM, Matthias Kaehlcke wrote:

> > I don't know for sure if this condition is superfluous or if there are
> > cases where it makes sense to have a .list_voltage but not
> > .get_voltage_sel.

> I don't think is the same condition. Unless I'm misreading the code
> what it's checking is if there's a .list_voltage even when there is
> no .get_voltage_sel.

Yes.

> IOW, it's valid to have a .list_voltage even when there's no callback
> for .get_voltage_sel, but the opposite isn't true.

Yes.

> >> Something like if (!rdev->supply || !rdev->switch) looks more clear
> >> to me.

> > I agree and we can even reduce it to if (!rdev_switch) since a switch
> > implicitly has a supply.

> I wonder if that's always true. What happens if you have a switch but
> its <name>-supply parent isn't defined in the Device Tree?

We may already be substituting in the dummy supply, I'd need to go check
but if we're not that's a fairly straightforward fix for the immediate
problem.  You do then have to worry about the fact that the parent
supply might not have voltage operations either, dummy supplies
obviously won't and there are use cases where an actual supply might not
either (things like unregulated wall supplies).

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ