From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
<olteanv@gmail.com>, <andrew@lunn.ch>, <vivien.didelot@gmail.com>,
<f.fainelli@gmail.com>,
"Zheng Yongjun" <zhengyongjun3@huawei.com>
Subject: [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()
Date: Wed, 9 Dec 2020 17:25:04 +0800 [thread overview]
Message-ID: <20201209092504.20470-1-zhengyongjun3@huawei.com> (raw)
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
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 12e76020bea3..e9617782e0d0 100644
--- a/drivers/net/dsa/sja1105/sja1105_flower.c
+++ b/drivers/net/dsa/sja1105/sja1105_flower.c
@@ -458,7 +458,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;
@@ -466,12 +465,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);
- if (rc)
- return rc;
-
- return 0;
}
void sja1105_flower_setup(struct dsa_switch *ds)
--
2.22.0
next reply other threads:[~2020-12-09 9:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 9:25 Zheng Yongjun [this message]
2020-12-09 10:32 ` [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() Vladimir Oltean
2020-12-09 19:42 ` Jakub Kicinski
2020-12-10 1:13 ` David Miller
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=20201209092504.20470-1-zhengyongjun3@huawei.com \
--to=zhengyongjun3@huawei.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).