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]
Message-ID: <20160116171149.GA9880@lunn.ch>
Date:	Sat, 16 Jan 2016 18:11:49 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Teresa Remmet <t.remmet@...tec.de>
Cc:	netdev@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>,
	linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode

> +static void smsc_phy_remove(struct phy_device *phydev)
> +{
> +	struct device *dev = &phydev->mdio.dev;
> +	bool *priv = phydev->priv;
> +
> +	if (priv)
> +		devm_kfree(dev, priv);
> +}

Not needed, since this is the devm_ API.

>From a stylistic point of view, it might be better to define a
structure with a single member. It is what people expect a priv to be.
It keeps the maintenance burden lower if you do things in the normal
way.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ