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:	Sun, 1 Nov 2015 11:29:11 +0900
From:	Mark Brown <broonie@...nel.org>
To:	Saurabh Sengar <saurabh.truth@...il.com>
Cc:	lgirdwood@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: of: removing two variables min_uV and max_uV

On Sat, Oct 31, 2015 at 08:31:31PM +0530, Saurabh Sengar wrote:

> -	min_uV = of_get_property(np, "regulator-min-microvolt", NULL);
> -	if (min_uV)
> -		constraints->min_uV = be32_to_cpu(*min_uV);

> +	if (!of_property_read_u32(np, "regulator-max-microvolt", &pval))
> +		constraints->max_uV = pval;

>  	/* Only one voltage?  Then make sure it's set. */
> -	if (min_uV && max_uV && constraints->min_uV == constraints->max_uV)
> +	if (constraints->min_uV == constraints->max_uV)
>  		constraints->apply_uV = true;

Your new code is not equivalent to the existing code.  The new code will
set apply_uV even if the DT properties are not present which will in
turn mean that we will end up attempting to apply a setting of 0V if
that happens which is not desirable.

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