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: <Zjy_jp2f-aY5mAR6@hovoldconsulting.com>
Date: Thu, 9 May 2024 14:20:30 +0200
From: Johan Hovold <johan@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Stephen Boyd <swboyd@...omium.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Johan Hovold <johan+linaro@...nel.org>, Lee Jones <lee@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Mark Brown <broonie@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...aro.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Das Srinagesh <quic_gurus@...cinc.com>,
	Satya Priya <quic_c_skakit@...cinc.com>,
	linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH 12/13] regulator: add pm8008 pmic regulator driver

On Thu, May 09, 2024 at 03:07:02PM +0300, Andy Shevchenko wrote:
> Wed, May 08, 2024 at 10:37:50PM +0000, Stephen Boyd kirjoitti:
> > Quoting Johan Hovold (2024-05-06 08:08:29)
> 
> ...
> 
> > > +               BUILD_BUG_ON((ARRAY_SIZE(pldo_ranges) != 1) ||
> > 
> > This should be an && not || right?
> 
> > > +                               (ARRAY_SIZE(nldo_ranges) != 1));
> 
> In any case BUILD_BUG_ON() is not encouraged for such cases, it would be much
> better to have a static_assert() near to one of those arrays.

I think the reason it is placed here is that the above line reads:

	rdesc->n_linear_ranges = 1;

and that would need to change if anyone expands the arrays.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ