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:	Fri, 7 Nov 2014 16:21:24 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Cc:	Kukjin Kim <kgene.kim@...sung.com>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Olof Johansson <olof@...om.net>,
	Chris Zhong <zyw@...k-chips.com>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Abhilash Kesavan <kesavan.abhilash@...il.com>,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v5 5/5] regulator: of: Add support for parsing initial
 and suspend modes

On Fri, Nov 07, 2014 at 05:15:38PM +0100, Javier Martinez Canillas wrote:
> On 11/07/2014 04:47 PM, Mark Brown wrote:

> >> +	if (!of_property_read_u32(np, "regulator-initial-mode", &pval)) {
> >> +		if (desc && desc->map_modes)
> >> +			constraints->initial_mode = desc->map_modes(pval);
> >> +		else
> >> +			pr_warn("%s: failed to parse regulator-initial-mode\n",
> >> +				np->name);
> >> +	}

> > This is ignoring any error return from map_modes(), it's possible the DT
> > might have an invalid value.  The error message could also use some
> > improvement, it's more that the kernel doesn't understand how to parse
> > it even if it is valid.

> Right, as I mentioned to Krzysztof in a previous email, I'll remove the
> warning message and add an error message instead if the map mode callback
> function fails and also show the error code as you suggest.

It seems reasonable to at least warn if there's a mode specified and
there's no way of understanding it...

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ