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] [day] [month] [year] [list]
Message-ID: <20220429184359.72b225e1@kernel.org>
Date:   Fri, 29 Apr 2022 18:43:59 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     cgel.zte@...il.com
Cc:     olteanv@...il.com, andrew@...n.ch, vivien.didelot@...il.com,
        f.fainelli@...il.com, davem@...emloft.net, pabeni@...hat.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] net: dsa: sja1105: simplify the return expression of
 sja1105_cls_flower_stats()

On Fri, 29 Apr 2022 05:52:26 +0000 cgel.zte@...il.com wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> Simplify the return expression.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> ---
>  drivers/net/dsa/sja1105/sja1105_flower.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dsa/sja1105/sja1105_flower.c b/drivers/net/dsa/sja1105/sja1105_flower.c
> index fad5afe3819c..16c93159e475 100644
> --- a/drivers/net/dsa/sja1105/sja1105_flower.c
> +++ b/drivers/net/dsa/sja1105/sja1105_flower.c
> @@ -501,7 +501,6 @@ int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
>  {
>  	struct sja1105_private *priv = ds->priv;
>  	struct sja1105_rule *rule = sja1105_rule_find(priv, cls->cookie);
> -	int rc;
>  
>  	if (!rule)
>  		return 0;
> @@ -509,12 +508,8 @@ int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
>  	if (rule->type != SJA1105_RULE_VL)
>  		return 0;
>  
> -	rc = sja1105_vl_stats(priv, port, rule, &cls->stats,
> +	return sja1105_vl_stats(priv, port, rule, &cls->stats,
>  			      cls->common.extack);

align continuation line

> -	if (rc)
> -		return rc;
> -
> -	return 0;
>  }
>  
>  void sja1105_flower_setup(struct dsa_switch *ds)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ