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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Sep 2012 10:41:58 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Kishon Vijay Abraham I <kishon@...com>, akpm@...ux-foundation.org,
	davem@...emloft.net, santosh.shilimkar@...com,
	grant.likely@...retlab.ca, balbi@...com, arnd@...db.de,
	gregkh@...uxfoundation.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	robherring2@...il.com, richard.zhao@...escale.com,
	B29397@...escale.com, alexander.shishkin@...ux.intel.com,
	mkl@...gutronix.de, marex@...x.de, p.paneri@...sung.com,
	devicetree-discuss@...ts.ozlabs.org,
	broonie@...nsource.wolfsonmicro.com
Subject: Re: [PATCH] drivers: phy: add generic PHY framework

On Wednesday, September 26, 2012 09:57:57 AM Joe Perches wrote:
> On Wed, 2012-09-26 at 20:31 +0530, Kishon Vijay Abraham I wrote:
> > The PHY framework provides a set of API's for the PHY drivers to
> > create/destroy a PHY and API's
> 
> Just some trivial notes.
> 
> > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> 
> []
> 
> > @@ -0,0 +1,445 @@
> 
> []
> 
> > +static void devm_phy_release(struct device *dev, void *res)
> > +{
> > +	struct phy *phy = *(struct phy **)res;
> 
> That's a bit twisted isn't it?
> Perhaps
> 	struct phy *phy = res;

No, because you really need to dereference ptr, not simply cast.

...

> > +
> > +	ptr = devres_alloc(devm_phy_release, sizeof(*ptr), GFP_KERNEL);
> 
> Is this the right size?
> 
> Because ptr is **, perhaps sizeof(struct phy) is clearer.

But incorrect.

Thanks.

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