All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net: sched: simplify code in mall_reoffload
@ 2022-09-17  6:35 williamsukatube
  2022-09-22  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: williamsukatube @ 2022-09-17  6:35 UTC (permalink / raw)
  To: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel
  Cc: William Dean

From: William Dean <williamsukatube@163.com>

such expression:
	if (err)
		return err;
	return 0;
can simplify to:
	return err;

Signed-off-by: William Dean <williamsukatube@163.com>
---
 net/sched/cls_matchall.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 06cf22adbab7..63b99ffb7dbc 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -313,10 +313,7 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
 	tc_cleanup_offload_action(&cls_mall.rule->action);
 	kfree(cls_mall.rule);

-	if (err)
-		return err;
-
-	return 0;
+	return err;
 }

 static void mall_stats_hw_filter(struct tcf_proto *tp,
--
2.25.1


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

* Re: [PATCH -next] net: sched: simplify code in mall_reoffload
  2022-09-17  6:35 [PATCH -next] net: sched: simplify code in mall_reoffload williamsukatube
@ 2022-09-22  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-22  1:30 UTC (permalink / raw)
  To: None
  Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 17 Sep 2022 14:35:56 +0800 you wrote:
> From: William Dean <williamsukatube@163.com>
> 
> such expression:
> 	if (err)
> 		return err;
> 	return 0;
> can simplify to:
> 	return err;
> 
> [...]

Here is the summary with links:
  - [-next] net: sched: simplify code in mall_reoffload
    https://git.kernel.org/netdev/net-next/c/2801f30e2cef

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-09-22  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17  6:35 [PATCH -next] net: sched: simplify code in mall_reoffload williamsukatube
2022-09-22  1:30 ` patchwork-bot+netdevbpf

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.