Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311002 > unrolled thread
| Started by | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| First post | 2016-01-16 18:20 +0100 |
| Last post | 2016-01-16 18:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode Andrew Lunn <andrew@lunn.ch> - 2016-01-16 18:20 +0100
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2016-01-16 18:20 +0100 |
| Subject | Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode |
| Message-ID | <qRCG6-7ja-13@gated-at.bofh.it> |
> +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
Back to top | Article view | linux.kernel
csiph-web