netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: Chris Healy <chealy@imsco-us.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/3] net: mdio-gpio: Use devm_ functions where possible
Date: Fri, 18 Apr 2014 23:19:25 +0400	[thread overview]
Message-ID: <53517ABD.5060001@cogentembedded.com> (raw)
In-Reply-To: <1397614602-29694-2-git-send-email-linux@roeck-us.net>

Hello.

On 04/16/2014 06:16 AM, Guenter Roeck wrote:

> This simplifies error path and deinit/removal functions.

> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>   drivers/net/phy/mdio-gpio.c |   19 +++++--------------
>   1 file changed, 5 insertions(+), 14 deletions(-)

> diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
> index e701433..e853066 100644
> --- a/drivers/net/phy/mdio-gpio.c
> +++ b/drivers/net/phy/mdio-gpio.c
> @@ -110,7 +110,7 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
[...]
> @@ -163,13 +159,8 @@ out:
>   static void mdio_gpio_bus_deinit(struct device *dev)
>   {
>   	struct mii_bus *bus = dev_get_drvdata(dev);
> -	struct mdio_gpio_info *bitbang = bus->priv;
>
> -	dev_set_drvdata(dev, NULL);

    You didn't even document this "drove-by" change. Ideally, it should have 
been in a separate patch.

> -	gpio_free(bitbang->mdio);
> -	gpio_free(bitbang->mdc);
>   	free_mdio_bitbang(bus);
> -	kfree(bitbang);
>   }

WBR, Sergei

  parent reply	other threads:[~2014-04-18 19:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  2:16 [PATCH 0/3] net: mdio-gpio enhancements Guenter Roeck
2014-04-16  2:16 ` [PATCH 1/3] net: mdio-gpio: Use devm_ functions where possible Guenter Roeck
2014-04-16  2:50   ` Chris Healy
2014-04-16  3:17     ` David Miller
2014-04-16 18:48   ` Chris Healy
2014-04-16 18:50     ` Chris Healy
2014-04-16 20:22       ` Guenter Roeck
2014-04-18 19:19   ` Sergei Shtylyov [this message]
2014-04-16  2:16 ` [PATCH 2/3] net: mdio-gpio: Add support for active low gpio pins Guenter Roeck
2014-04-16  2:44   ` Chris Healy
2014-04-16  2:16 ` [PATCH 3/3] net: mdio-gpio: Add support for separate MDI and MDO " Guenter Roeck
2014-04-16  2:45   ` Chris Healy
2014-04-16 19:10 ` [PATCH 0/3] net: mdio-gpio enhancements David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53517ABD.5060001@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=chealy@imsco-us.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).