* [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule
@ 2024-01-05 6:56 Zhengchao Shao
2024-01-05 21:39 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Zhengchao Shao @ 2024-01-05 6:56 UTC (permalink / raw)
To: netdev, davem, edumazet, kuba, pabeni
Cc: weiyongjun1, yuehaibing, shaozhengchao
In fib_nl2rule(), 'err' variable has been set to -EINVAL during
declaration, and no need to set the 'err' variable to -EINVAL again.
So, remove it.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
net/core/fib_rules.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 75282222e0b4..a50a0bde8db1 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -594,7 +594,6 @@ static int fib_nl2rule(struct sk_buff *skb, struct nlmsghdr *nlh,
if (tb[FRA_TUN_ID])
nlrule->tun_id = nla_get_be64(tb[FRA_TUN_ID]);
- err = -EINVAL;
if (tb[FRA_L3MDEV] &&
fib_nl2rule_l3mdev(tb[FRA_L3MDEV], nlrule, extack) < 0)
goto errout_free;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule
2024-01-05 6:56 [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule Zhengchao Shao
@ 2024-01-05 21:39 ` Simon Horman
2024-01-06 16:08 ` David Ahern
2024-01-07 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-01-05 21:39 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, davem, edumazet, kuba, pabeni, weiyongjun1, yuehaibing
On Fri, Jan 05, 2024 at 02:56:34PM +0800, Zhengchao Shao wrote:
> In fib_nl2rule(), 'err' variable has been set to -EINVAL during
> declaration, and no need to set the 'err' variable to -EINVAL again.
> So, remove it.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Thanks, I agree that this seems unnecessary.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule
2024-01-05 6:56 [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule Zhengchao Shao
2024-01-05 21:39 ` Simon Horman
@ 2024-01-06 16:08 ` David Ahern
2024-01-07 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2024-01-06 16:08 UTC (permalink / raw)
To: Zhengchao Shao, netdev, davem, edumazet, kuba, pabeni
Cc: weiyongjun1, yuehaibing
On 1/4/24 11:56 PM, Zhengchao Shao wrote:
> In fib_nl2rule(), 'err' variable has been set to -EINVAL during
> declaration, and no need to set the 'err' variable to -EINVAL again.
> So, remove it.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> net/core/fib_rules.c | 1 -
> 1 file changed, 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule
2024-01-05 6:56 [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule Zhengchao Shao
2024-01-05 21:39 ` Simon Horman
2024-01-06 16:08 ` David Ahern
@ 2024-01-07 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-07 15:20 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, davem, edumazet, kuba, pabeni, weiyongjun1, yuehaibing
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 5 Jan 2024 14:56:34 +0800 you wrote:
> In fib_nl2rule(), 'err' variable has been set to -EINVAL during
> declaration, and no need to set the 'err' variable to -EINVAL again.
> So, remove it.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> net/core/fib_rules.c | 1 -
> 1 file changed, 1 deletion(-)
Here is the summary with links:
- [net-next] fib: rules: remove repeated assignment in fib_nl2rule
https://git.kernel.org/netdev/net-next/c/c4a5ee9c09aa
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] 4+ messages in thread
end of thread, other threads:[~2024-01-07 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 6:56 [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule Zhengchao Shao
2024-01-05 21:39 ` Simon Horman
2024-01-06 16:08 ` David Ahern
2024-01-07 15:20 ` patchwork-bot+netdevbpf
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).