From: Jakub Kicinski <kuba@kernel.org>
To: cgel.zte@gmail.com
Cc: olteanv@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com,
f.fainelli@gmail.com, davem@davemloft.net, pabeni@redhat.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] net: dsa: sja1105: simplify the return expression of sja1105_cls_flower_stats()
Date: Fri, 29 Apr 2022 18:43:59 -0700 [thread overview]
Message-ID: <20220429184359.72b225e1@kernel.org> (raw)
In-Reply-To: <20220429055226.3852334-1-chi.minghao@zte.com.cn>
On Fri, 29 Apr 2022 05:52:26 +0000 cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.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)
prev parent reply other threads:[~2022-04-30 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 5:52 [PATCH] net: dsa: sja1105: simplify the return expression of sja1105_cls_flower_stats() cgel.zte
2022-04-30 1:43 ` Jakub Kicinski [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=20220429184359.72b225e1@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=zealci@zte.com.cn \
/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.