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:	Thu, 3 Jul 2014 16:55:38 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Beniamino Galvani <b.galvani@...il.com>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Wenyou Yang <wenyou.yang@...el.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Heiko Stuebner <heiko@...ech.de>, devicetree@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/5] regulator: act8865: set correct number of regulators
 in pdata

On Sun, Jun 29, 2014 at 11:46:43AM +0200, Beniamino Galvani wrote:
> On Fri, Jun 27, 2014 at 05:07:25PM +0100, Mark Brown wrote:
> > On Sun, Jun 22, 2014 at 05:31:42PM +0200, Beniamino Galvani wrote:
> > > When platform data is populated from DT all the regulators are
> > > instantiated and the value of num_regulators should be the number of
> > > all available regulators rather than the number of matched ones.

> > Could you go into more detail on your logic on this one please?  The
> > platform data (and DT configuration) for regulators should be completely
> > optional.

> pdata contains an array of struct act8865_regulator_data and a
> num_regulators field which should hold the number of elements in the
> array, if I understand correctly.

> So in the current code, when populating platform data from DT, there
> is a mismatch between the number of elements that are put in the array
> (ARRAY_SIZE(act8865_matches)) and the value of num_regulators, which
> is set to the number of regulators found in the DT.

> In case of missing regulator nodes in DT, pdata->regulators will be
> populated with all the regulators but their init_data will be NULL.

OK, so that was slightly unclear but I see what you're saying now - the
issue isn't that there will be fewer valid elements in the array, it's
that the array is sparsely populated.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ