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: <20121009062231.GI8237@opensource.wolfsonmicro.com>
Date:	Tue, 9 Oct 2012 15:22:34 +0900
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	lrg@...com, sameo@...ux.intel.com, vbyravarasu@...dia.com,
	axel.lin@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] regulator; tps65090: Register all regulators in
 single probe call

On Sat, Oct 06, 2012 at 08:47:48PM +0530, Laxman Dewangan wrote:
> MFD drier registers the regulator driver once per device and
> hence it is require to register all regulators in single probe
> call.
> Following are details of changes done to achieve this:
> - Add max regulator and register all regulators even if there
>   is no regulator init data from platform.
> - Convert regulator init data to pointer type in platform data.
> - Add input supply name in regulator desc to provide input supply.
> - Separate desc information from driver information.

Shouldn't this be the first commit in the series?  Also...

> +	for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
> +		tps_pdata = tps65090_pdata->reg_pdata[num];

>  struct tps65090_regulator_platform_data {
> -	struct regulator_init_data regulator;
> +	struct regulator_init_data *reg_init_data;
>  };

I can't help but think that if we're going to require the full array
here the array should just be declared immediately - perhaps as an array
of pointers:

	struct regulator_init_data *reg_init_data[TPS65090_REGULATOR_MAX];

to allow things to be missed out.  Otherwise we're likely to crash if
the user misses a regulator or something.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ