Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311002 > unrolled thread

Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode

Started byAndrew Lunn <andrew@lunn.ch>
First post2016-01-16 18:20 +0100
Last post2016-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.


Contents

  Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode Andrew Lunn <andrew@lunn.ch> - 2016-01-16 18:20 +0100

#1311002 — Re: [PATCH] net: phy: smsc: Fix disabling energy detect mode

FromAndrew Lunn <andrew@lunn.ch>
Date2016-01-16 18:20 +0100
SubjectRe: [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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web