Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode
From: Andrew Lunn
Date: Sat Jan 16 2016 - 12:11:56 EST
> +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