All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	grant.likely@linaro.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, f.fainelli@gmail.com,
	netdev@vger.kernel.org, frowand.list@gmail.com
Subject: Re: [PATCH 2/2] of_mdio: use PTR_ERR_OR_ZERO()
Date: Sat, 12 Mar 2016 01:02:00 +0200	[thread overview]
Message-ID: <56E34E68.4070502@mleia.com> (raw)
In-Reply-To: <11956015.EKV4zhDQJ5@wasted.cogentembedded.com>

Hello Sergei,

On 12.03.2016 00:13, Sergei Shtylyov wrote:
> PTR_ERR_OR_ZERO() is open coded in of_phy_register_fixed_link(), so just
> call it directly...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  drivers/of/of_mdio.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Index: net-next/drivers/of/of_mdio.c
> ===================================================================
> --- net-next.orig/drivers/of/of_mdio.c
> +++ net-next/drivers/of/of_mdio.c
> @@ -412,7 +412,7 @@ int of_phy_register_fixed_link(struct de
>  		if (strcmp(managed, "in-band-status") == 0) {
>  			/* status is zeroed, namely its .link member */
>  			phy = fixed_phy_register(PHY_POLL, &status, -1, np);
> -			return IS_ERR(phy) ? PTR_ERR(phy) : 0;
> +			return PTR_ERR_OR_ZERO(phy);
>  		}
>  	}
>  
> @@ -434,7 +434,7 @@ int of_phy_register_fixed_link(struct de
>  			return -EPROBE_DEFER;
>  
>  		phy = fixed_phy_register(PHY_POLL, &status, link_gpio, np);
> -		return IS_ERR(phy) ? PTR_ERR(phy) : 0;
> +		return PTR_ERR_OR_ZERO(phy);
>  	}
>  
>  	/* Old binding */
> @@ -446,7 +446,7 @@ int of_phy_register_fixed_link(struct de
>  		status.pause = be32_to_cpu(fixed_link_prop[3]);
>  		status.asym_pause = be32_to_cpu(fixed_link_prop[4]);
>  		phy = fixed_phy_register(PHY_POLL, &status, -1, np);
> -		return IS_ERR(phy) ? PTR_ERR(phy) : 0;
> +		return PTR_ERR_OR_ZERO(phy);
>  	}
>  
>  	return -ENODEV;
> 

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

      parent reply	other threads:[~2016-03-11 23:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 22:11 [PATCH 0/2] of_mdio: use IS_ERR_OR_NULL() and PTR_ERR_OR_ZERO() Sergei Shtylyov
2016-03-11 22:12 ` [PATCH 1/2] of_mdio: use IS_ERR_OR_NULL() Sergei Shtylyov
2016-03-11 22:48   ` Florian Fainelli
     [not found]   ` <3305414.rAFdOb57tB-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-03-11 22:53     ` Vladimir Zapolskiy
2016-03-11 23:03       ` Florian Fainelli
2016-03-11 22:13 ` [PATCH 2/2] of_mdio: use PTR_ERR_OR_ZERO() Sergei Shtylyov
2016-03-11 22:49   ` Florian Fainelli
2016-03-11 23:02   ` Vladimir Zapolskiy [this message]

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=56E34E68.4070502@mleia.com \
    --to=vz@mleia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.