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: <20150203162536.GQ21293@sirena.org.uk>
Date:	Tue, 3 Feb 2015 16:25:37 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Jaewon Kim <jaewon02.kim@...sung.com>
Cc:	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	linux-pm@...r.kernel.org, Inki Dae <inki.dae@...sung.com>,
	SangBae Lee <sangbae90.lee@...sung.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>,
	Lee Jones <lee.jones@...aro.org>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Sebastian Reichel <sre@...nel.org>,
	Beomho Seo <beomho.seo@...sung.com>
Subject: Re: [PATCH v2 5/6] regulator: max77843: Add max77843 regulator driver

On Tue, Feb 03, 2015 at 02:04:05PM +0900, Jaewon Kim wrote:
> This patch adds new regulator driver to support max77843
> MFD(Multi Function Device) chip`s regulators.
> The Max77843 has two voltage regulators for USB safeout.

This looks mostly good, a couple of very small things:

> +static const struct regulator_desc max77843_supported_regulators[] = {
> +	[MAX77843_SAFEOUT1] = {
> +		.name		= "SAFEOUT1",
> +		.id		= MAX77843_SAFEOUT1,
> +		.ops		= &max77843_regulator_ops,
> +		.of_match	= of_match_ptr("SAFEOUT1"),
> +		.regulators_node = of_match_ptr("regulators"),
> +		.type		= REGULATOR_VOLTAGE,
> +		.owner		= THIS_MODULE,
> +		.n_voltages	= MAX77843_SUPPORTED_VOLTAGE_NUM,
> +		.volt_table	= max77843_regulator_table,

It's better to make n_voltages be ARRAY_SIZE() for the table, that way
there's no need to keep the define and array lined up if someone extends
the driver.  A name like _safeout_voltage_table might be clearer too.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ