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]
Message-ID: <20210609232424.GB8706@linux.intel.com>
Date:   Thu, 10 Jun 2021 07:24:24 +0800
From:   Wong Vee Khee <vee.khee.wong@...ux.intel.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Ong Boon Leong <boon.leong.ong@...el.com>,
        Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        Jose Abreu <Jose.Abreu@...opsys.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King - ARM Linux admin <linux@...linux.org.uk>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next 03/13] net: stmmac: reduce indentation when
 calling stmmac_xpcs_setup

On Wed, Jun 09, 2021 at 09:41:45PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> There is no reason to embed an if within an if, we can just logically
> AND the two conditions.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1c881ec8cd04..372673f9af30 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -7002,12 +7002,10 @@ int stmmac_dvr_probe(struct device *device,
>  	if (priv->plat->speed_mode_2500)
>  		priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv);
>  
> -	if (priv->plat->mdio_bus_data) {
> -		if (priv->plat->mdio_bus_data->has_xpcs) {
> -			ret = stmmac_xpcs_setup(priv->mii);
> -			if (ret)
> -				goto error_xpcs_setup;
> -		}
> +	if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) {
> +		ret = stmmac_xpcs_setup(priv->mii);
> +		if (ret)
> +			goto error_xpcs_setup;
>  	}
>  
>  	ret = stmmac_phy_setup(priv);
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ