All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()
@ 2020-12-09  9:25 Zheng Yongjun
  2020-12-09 10:32 ` Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zheng Yongjun @ 2020-12-09  9:25 UTC (permalink / raw)
  To: davem, netdev
  Cc: kuba, linux-kernel, olteanv, andrew, vivien.didelot, f.fainelli,
	Zheng Yongjun

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()
  2020-12-09  9:25 [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() Zheng Yongjun
@ 2020-12-09 10:32 ` Vladimir Oltean
  2020-12-09 19:42 ` Jakub Kicinski
  2020-12-10  1:13 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2020-12-09 10:32 UTC (permalink / raw)
  To: Zheng Yongjun
  Cc: davem, netdev, kuba, linux-kernel, andrew, vivien.didelot, f.fainelli

On Wed, Dec 09, 2020 at 05:25:04PM +0800, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()
  2020-12-09  9:25 [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() Zheng Yongjun
  2020-12-09 10:32 ` Vladimir Oltean
@ 2020-12-09 19:42 ` Jakub Kicinski
  2020-12-10  1:13 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-12-09 19:42 UTC (permalink / raw)
  To: Zheng Yongjun
  Cc: davem, netdev, linux-kernel, olteanv, andrew, vivien.didelot, f.fainelli

On Wed, 9 Dec 2020 17:25:04 +0800 Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Looks like this one doesn't apply cleanly to net-next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()
  2020-12-09  9:25 [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() Zheng Yongjun
  2020-12-09 10:32 ` Vladimir Oltean
  2020-12-09 19:42 ` Jakub Kicinski
@ 2020-12-10  1:13 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-12-10  1:13 UTC (permalink / raw)
  To: zhengyongjun3
  Cc: netdev, kuba, linux-kernel, olteanv, andrew, vivien.didelot, f.fainelli

From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:25:04 +0800

> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-10  1:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  9:25 [PATCH net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() Zheng Yongjun
2020-12-09 10:32 ` Vladimir Oltean
2020-12-09 19:42 ` Jakub Kicinski
2020-12-10  1:13 ` David Miller

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.