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:	Tue, 4 Sep 2012 17:44:30 +0200
From:	Andi Shyti <andi@...zian.org>
To:	Dong Aisheng <b29396@...escale.com>,
	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	Andi Shyti <andi@...zian.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linus.walleij@...ricsson.com" <linus.walleij@...ricsson.com>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"kernel@...gutronix.de" <kernel@...gutronix.de>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"sameo@...ux.intel.com" <sameo@...ux.intel.com>,
	"lrg@...com" <lrg@...com>,
	"broonie@...nsource.wolfsonmicro.com" 
	<broonie@...nsource.wolfsonmicro.com>,
	Zhao Richard-B20223 <B20223@...escale.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"swarren@...dotorg.org" <swarren@...dotorg.org>
Subject: Re: [PATCH v5 1/4] mfd: add syscon driver based on regmap

On Tue, Sep 04, 2012 at 07:46:02PM +0800, Dong Aisheng wrote:
> On Tue, Sep 04, 2012 at 07:35:45PM +0800, Andi Shyti wrote:
> > Hi Dong,
> > 
> > On Tue, Sep 04, 2012 at 11:20:08AM +0800, Dong Aisheng wrote:
> > > +static int __devinit syscon_probe(struct platform_device *pdev)
> > > +{
> > > +	struct device *dev = &pdev->dev;
> > 
> > Do we really need this variable? Anyway you are using it only
> > once in the dev_info.
> > 
> Okay, i can remove it.

On Tue, Sep 04, 2012 at 04:16:59PM +0400, Sergei Shtylyov wrote:
>    But Dong definitely could use it more than once, so it seems useful.

[sorry for pasting your e-mail here]
yes, but he is using it only once and, it's easily
reachable with pdev->dev and anyway Dong is using &pdev->dev.

> > > +
> > > +	syscon = devm_kzalloc(&pdev->dev, sizeof(struct syscon),
> > > +			    GFP_KERNEL);
> > 
> > in case of error you are not freeing syscon.
> Do we need it for managed resource of syscon?

Yes, you're right :)

> > Moreover, in my opinion, some dev_err more should not heart
                                                           ^^
as Sergei points out is 'hurt'... mistype :)

> There's no much error cases here, most of them rarely fails and i don't feel
> we really need add.
> I don't know what dev_err you suggested to add?

For example some failure cases, anyway i read quickly the code
and I don't big see issues.

Andi
--
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