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] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2016 07:12:40 +0000
From:	"Yang, Wenyou" <Wenyou.Yang@...el.com>
To:	Mark Brown <broonie@...nel.org>
CC:	Liam Girdwood <lgirdwood@...il.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>,
	"Ferre, Nicolas" <Nicolas.FERRE@...el.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH 1/2] regulator: act8945a: add regulator driver for
 ACT8945A

Hi Mark,

Thank you for your review.

> -----Original Message-----
> From: Mark Brown [mailto:broonie@...nel.org]
> Sent: 2016年1月16日 1:58
> To: Yang, Wenyou <Wenyou.Yang@...el.com>
> Cc: Liam Girdwood <lgirdwood@...il.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>;
> Ferre, Nicolas <Nicolas.FERRE@...el.com>; linux-arm-
> kernel@...ts.infradead.org; linux-kernel@...r.kernel.org;
> devicetree@...r.kernel.org
> Subject: Re: [PATCH 1/2] regulator: act8945a: add regulator driver for ACT8945A
> 
> On Fri, Jan 08, 2016 at 10:08:57AM +0800, Wenyou Yang wrote:
> 
> > +	np = of_get_child_by_name(pdev->dev.of_node, "regulators");
> > +	if (!np) {
> > +		dev_err(&pdev->dev, "regulator node not found\n");
> > +		return -EINVAL;
> > +	}
> > +
> > +	matches = act8945a_matches;
> > +	num_matches = ARRAY_SIZE(act8945a_matches);
> > +
> > +	ret = of_regulator_match(&pdev->dev, np, matches, num_matches);
> 
> Don't open code this, use the core regulators_node and of_match implementation
> instead.

Good. In the next version, I use the code implementation, and remove the redundant code.

Thank you for your advice.

> 
> > +		dev_info(act8945a_dev->dev, "%s regulator registered\n",
> > +			desc->name);
> 
> This is just noise, please remove it - let the core handle notifying users.

It is fixed in version 2.

> 
> > +static int __init act8945a_pmic_init(void) {
> > +	return platform_driver_register(&act8945a_pmic_driver);
> > +}
> > +subsys_initcall(act8945a_pmic_init);
> 
> Please use module_platform_driver() unless there is a strong reason to do
> otherwise.

It is fixed in version 2 too.


Best Regards,
Wenyou Yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ