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:   Fri, 4 Jun 2021 09:49:17 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     dingsenjie@....com, richardcochran@...il.com, andrew@...n.ch,
        davem@...emloft.net, kuba@...nel.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        dingsenjie <dingsenjie@...ong.com>
Subject: Re: [PATCH] net: phy: Simplify the return expression of
 dp83640_ack_interrupt

On 04.06.2021 05:22, dingsenjie@....com wrote:
> From: dingsenjie <dingsenjie@...ong.com>
> 
> Simplify the return expression.
> 
> Signed-off-by: dingsenjie <dingsenjie@...ong.com>
> ---
>  drivers/net/phy/dp83640.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
> index 0d79f68..bcd14ec 100644
> --- a/drivers/net/phy/dp83640.c
> +++ b/drivers/net/phy/dp83640.c
> @@ -1141,12 +1141,7 @@ static int dp83640_config_init(struct phy_device *phydev)
>  
>  static int dp83640_ack_interrupt(struct phy_device *phydev)
>  {
> -	int err = phy_read(phydev, MII_DP83640_MISR);
> -
> -	if (err < 0)
> -		return err;
> -
> -	return 0;
> +	return phy_read(phydev, MII_DP83640_MISR);
>  }
>  
>  static int dp83640_config_intr(struct phy_device *phydev)
> 
This would be a functional change. You'd return a positive value
instead of 0.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ