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: <4189cb2094b4fe43e351eb1d80ca6c4cb1ac08ed.camel@fi.rohmeurope.com>
Date:   Mon, 24 May 2021 08:41:06 +0300
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     Axel Lin <axel.lin@...ics.com>, Mark Brown <broonie@...nel.org>
Cc:     Lee Jones <lee.jones@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org, linux-power@...rohmeurope.com
Subject: Re: [PATCH 1/2] regulator: bd70528: Fix off-by-one for buck123
 .n_voltages setting

Hi Axel,

On Sun, 2021-05-23 at 15:10 +0800, Axel Lin wrote:
> The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages
> should be 16 (0x10). Use 0x10 to make it consistent with
> BD70528_LDO_VOLTS.
> Also remove redundant defines for BD70528_BUCK_VOLTS.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> I think this fix does not need "Fixes" tag because in original code
> the
> .n_voltage is greater than correct one. The latest selector is not
> valid
> in the linear range setting anyway.
>  include/linux/mfd/rohm-bd70528.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/include/linux/mfd/rohm-bd70528.h
> b/include/linux/mfd/rohm-bd70528.h
> index a57af878fd0c..4a5966475a35 100644
> --- a/include/linux/mfd/rohm-bd70528.h
> +++ b/include/linux/mfd/rohm-bd70528.h
> @@ -26,9 +26,7 @@ struct bd70528_data {
>  	struct mutex rtc_timer_lock;
>  };
>  
> -#define BD70528_BUCK_VOLTS 17
> -#define BD70528_BUCK_VOLTS 17
> -#define BD70528_BUCK_VOLTS 17
> +#define BD70528_BUCK_VOLTS 0x10

Thank you for fixing this. There really is only 16 valid voltage
settings as you pointed out. Regarding changing the define to hex - I
would prefer seeing the amount in decimal as it is easier to
understand. (I do understand bit-patterns better when in HEX - but
"real world" values like voltages, currents or amounts are easier (for
me) to understand when in decimals)


Best Regards
	Matti Vaittinen

--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland
SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~

Simon says - in Latin please.
"non cogito me" dixit Rene Descarte, deinde evanescavit

(Thanks for the translation Simon)


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