All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: sched: cls_api: fix dead code in switch
@ 2018-07-25 14:07 Gustavo A. R. Silva
  2018-07-25 14:31 ` Jiri Pirko
  2018-07-26 21:10 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-25 14:07 UTC (permalink / raw)
  To: Jiri Pirko, Jamal Hadi Salim, Cong Wang, David S. Miller
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

Code at line 1850 is unreachable. Fix this by removing the break
statement above it, so the code for case RTM_GETCHAIN can be
properly executed.

Addresses-Coverity-ID: 1472050 ("Structurally dead code")
Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 net/sched/cls_api.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 5f7098b..f3d78c2 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1846,7 +1846,6 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n,
 		tcf_chain_put_explicitly_created(chain);
 		break;
 	case RTM_GETCHAIN:
-		break;
 		err = tc_chain_notify(chain, skb, n->nlmsg_seq,
 				      n->nlmsg_seq, n->nlmsg_type, true);
 		if (err < 0)
-- 
2.7.4


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

* Re: [PATCH] net: sched: cls_api: fix dead code in switch
  2018-07-25 14:07 [PATCH] net: sched: cls_api: fix dead code in switch Gustavo A. R. Silva
@ 2018-07-25 14:31 ` Jiri Pirko
  2018-07-26 21:10 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2018-07-25 14:31 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Jiri Pirko, Jamal Hadi Salim, Cong Wang, David S. Miller, netdev,
	linux-kernel

Wed, Jul 25, 2018 at 04:07:24PM CEST, gustavo@embeddedor.com wrote:
>Code at line 1850 is unreachable. Fix this by removing the break
>statement above it, so the code for case RTM_GETCHAIN can be
>properly executed.
>
>Addresses-Coverity-ID: 1472050 ("Structurally dead code")
>Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
>Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

I'm just writing a selftest to test this path. Thanks.

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

* Re: [PATCH] net: sched: cls_api: fix dead code in switch
  2018-07-25 14:07 [PATCH] net: sched: cls_api: fix dead code in switch Gustavo A. R. Silva
  2018-07-25 14:31 ` Jiri Pirko
@ 2018-07-26 21:10 ` David Miller
  2018-07-26 21:32   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2018-07-26 21:10 UTC (permalink / raw)
  To: gustavo; +Cc: jiri, jhs, xiyou.wangcong, netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Wed, 25 Jul 2018 09:07:24 -0500

> Code at line 1850 is unreachable. Fix this by removing the break
> statement above it, so the code for case RTM_GETCHAIN can be
> properly executed.
> 
> Addresses-Coverity-ID: 1472050 ("Structurally dead code")
> Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied, thanks.

Please use "[PATCH net-next] ..." in your subject lines to indirect
the tree that this change is relevant for and targetted to.

Thank you.

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

* Re: [PATCH] net: sched: cls_api: fix dead code in switch
  2018-07-26 21:10 ` David Miller
@ 2018-07-26 21:32   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-26 21:32 UTC (permalink / raw)
  To: David Miller; +Cc: jiri, jhs, xiyou.wangcong, netdev, linux-kernel



On 07/26/2018 04:10 PM, David Miller wrote:
> From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Date: Wed, 25 Jul 2018 09:07:24 -0500
> 
>> Code at line 1850 is unreachable. Fix this by removing the break
>> statement above it, so the code for case RTM_GETCHAIN can be
>> properly executed.
>>
>> Addresses-Coverity-ID: 1472050 ("Structurally dead code")
>> Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> Applied, thanks.
> 
> Please use "[PATCH net-next] ..." in your subject lines to indirect
> the tree that this change is relevant for and targetted to.
> 

Got it. Will do next time.

Thanks
--
Gustavo

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

end of thread, other threads:[~2018-07-26 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 14:07 [PATCH] net: sched: cls_api: fix dead code in switch Gustavo A. R. Silva
2018-07-25 14:31 ` Jiri Pirko
2018-07-26 21:10 ` David Miller
2018-07-26 21:32   ` Gustavo A. R. Silva

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.