All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/sched: cls_u32: simplify the return expression of u32_reoffload_knode()
@ 2020-12-08 12:08 Zheng Yongjun
  2020-12-09  0:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-08 12:08 UTC (permalink / raw)
  To: xiyou.wangcong, jiri, davem, kuba, netdev, linux-kernel; +Cc: Zheng Yongjun

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 net/sched/cls_u32.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 54209a18d7fe..6e1abe805448 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -1171,7 +1171,6 @@ static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n,
 	struct tc_u_hnode *ht = rtnl_dereference(n->ht_down);
 	struct tcf_block *block = tp->chain->block;
 	struct tc_cls_u32_offload cls_u32 = {};
-	int err;
 
 	tc_cls_common_offload_init(&cls_u32.common, tp, n->flags, extack);
 	cls_u32.command = add ?
@@ -1194,13 +1193,9 @@ static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n,
 			cls_u32.knode.link_handle = ht->handle;
 	}
 
-	err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSU32,
-				    &cls_u32, cb_priv, &n->flags,
-				    &n->in_hw_count);
-	if (err)
-		return err;
-
-	return 0;
+	return tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSU32,
+				     &cls_u32, cb_priv, &n->flags,
+				     &n->in_hw_count);
 }
 
 static int u32_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
-- 
2.22.0


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

* Re: [PATCH net-next] net/sched: cls_u32: simplify the return expression of u32_reoffload_knode()
  2020-12-08 12:08 [PATCH net-next] net/sched: cls_u32: simplify the return expression of u32_reoffload_knode() Zheng Yongjun
@ 2020-12-09  0:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-12-09  0:23 UTC (permalink / raw)
  To: zhengyongjun3; +Cc: xiyou.wangcong, jiri, kuba, netdev, linux-kernel

From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Tue, 8 Dec 2020 20:08:22 +0800

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

Applied

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

end of thread, other threads:[~2020-12-09  0:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 12:08 [PATCH net-next] net/sched: cls_u32: simplify the return expression of u32_reoffload_knode() Zheng Yongjun
2020-12-09  0:23 ` 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.