* [PATCH net] net_sched: remove impossible conditions
@ 2022-08-25 13:25 Dan Carpenter
2022-08-25 18:01 ` Jiri Pirko
2022-08-27 2:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-08-25 13:25 UTC (permalink / raw)
To: Jamal Hadi Salim
Cc: Cong Wang, Jiri Pirko, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, kernel-janitors
We no longer allow "handle" to be zero, so there is no need to check
for that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This obviously is low priority so it could go to net-next instead.
net/sched/cls_route.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index 48712bc51bda..29adac7812fe 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -488,7 +488,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
}
if (opt == NULL)
- return handle ? -EINVAL : 0;
+ return -EINVAL;
err = nla_parse_nested_deprecated(tb, TCA_ROUTE4_MAX, opt,
route4_policy, NULL);
@@ -496,7 +496,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
return err;
fold = *arg;
- if (fold && handle && fold->handle != handle)
+ if (fold && fold->handle != handle)
return -EINVAL;
err = -ENOBUFS;
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net_sched: remove impossible conditions
2022-08-25 13:25 [PATCH net] net_sched: remove impossible conditions Dan Carpenter
@ 2022-08-25 18:01 ` Jiri Pirko
2022-08-27 2:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2022-08-25 18:01 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jamal Hadi Salim, Cong Wang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, kernel-janitors
Thu, Aug 25, 2022 at 03:25:08PM CEST, dan.carpenter@oracle.com wrote:
>We no longer allow "handle" to be zero, so there is no need to check
>for that.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>---
>This obviously is low priority so it could go to net-next instead.
It should. Does not fix anything.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net_sched: remove impossible conditions
2022-08-25 13:25 [PATCH net] net_sched: remove impossible conditions Dan Carpenter
2022-08-25 18:01 ` Jiri Pirko
@ 2022-08-27 2:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-27 2:50 UTC (permalink / raw)
To: Dan Carpenter
Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, netdev,
kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 25 Aug 2022 16:25:08 +0300 you wrote:
> We no longer allow "handle" to be zero, so there is no need to check
> for that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This obviously is low priority so it could go to net-next instead.
>
> [...]
Here is the summary with links:
- [net] net_sched: remove impossible conditions
https://git.kernel.org/netdev/net-next/c/53a406803ca5
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] 3+ messages in thread
end of thread, other threads:[~2022-08-27 2:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 13:25 [PATCH net] net_sched: remove impossible conditions Dan Carpenter
2022-08-25 18:01 ` Jiri Pirko
2022-08-27 2:50 ` 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).