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:	Tue, 24 Jun 2014 16:38:12 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Robert Jarzmik <robert.jarzmik@...e.fr>
Cc:	Liam Girdwood <lgirdwood@...il.com>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: max1586 add device-tree support

On Tue, Jun 17, 2014 at 09:16:52PM +0200, Robert Jarzmik wrote:
> Mark Brown <broonie@...nel.org> writes:
> > On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote:

> >> +	matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch));
> >> +	of_node_put(np);
> >> +	if (matched <= 0)
> >> +		return matched;

> > Why is this treating zero as an error?  We should be able to at least
> > report the current state of regulators even if none are configured in
> > the device tree.

> Euh how so an error ?

> If 0 is returned, this means no regulators are found in device-tree. It's not an
> error, it's a lack of regulators (ie. no Output_V3 and no Output_V6), and no
> more handling is necessary in this function, while returning "ok", ie 0 ...

OK, so there's just nothing to do in that case.  That's fine, but it's
just not at all clear from the code.  A comment would help.

> As for the "state report", this max1586 doesn't report anything, it cannot even
> be queried about the current voltage, sic ...

It can't?  That's unfortunate, though I was able to turn up a datasheet
which appears to support that.

> If you want me to modify this bit I need a bit more of an explanation to
> understand.

Where the driver is doing unusual things if they are actually sensible
then the change needs to be clearer about why.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ