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: <20120626090825.GI30406@opensource.wolfsonmicro.com>
Date:	Tue, 26 Jun 2012 10:08:25 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org, Liam Girdwood <lrg@...com>
Subject: Re: [PATCH] regulator: arizona-micsupp: Fix choosing selector in
 arizona_micsupp_map_voltage

On Tue, Jun 26, 2012 at 04:01:47PM +0800, Axel Lin wrote:

> +	if (min_uV > 3300000)
> +		return -EINVAL;
> +

This is OK but I think we want to factor this out into the caller as
we're implementing this limits check in a lot of places.

> -	if (min_uV >= 3300000)
> +	if (min_uV > 3200000)
>  		selector = ARIZONA_MICSUPP_MAX_SELECTOR;
>  	else
>  		selector = DIV_ROUND_UP(min_uV - 1700000, 50000);

This doesn't change anything; with version of the if statement will give
3.3V for a voltage between 3.2V and 3.3V as there's no gaps in the
selector space so if we're over 3.2V we'll round up to 3.3V.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ