diff mbox series

[net] net_sched: remove impossible conditions

Message ID Ywd4NIoS4aiilnMv@kili (mailing list archive)
State Accepted
Commit 53a406803ca5b0b1f91beffacad4321fae4fa2a7
Delegated to: Netdev Maintainers
Headers show
Series [net] net_sched: remove impossible conditions | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 85 this patch: 85
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 85 this patch: 85
netdev/checkpatch warning WARNING: suspect code indent for conditional statements (8, 24)
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Aug. 25, 2022, 1:25 p.m. UTC
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(-)

Comments

Jiri Pirko Aug. 25, 2022, 6:01 p.m. UTC | #1
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.
patchwork-bot+netdevbpf@kernel.org Aug. 27, 2022, 2:50 a.m. UTC | #2
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!
diff mbox series

Patch

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;