lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 12 Mar 2016 01:02:00 +0200
From:	Vladimir Zapolskiy <vz@...ia.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	grant.likely@...aro.org, robh+dt@...nel.org,
	devicetree@...r.kernel.org, f.fainelli@...il.com,
	netdev@...r.kernel.org, frowand.list@...il.com
Subject: Re: [PATCH 2/2] of_mdio: use PTR_ERR_OR_ZERO()

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@...entembedded.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@...ia.com>

--
With best wishes,
Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ