* [PATCH] tipc: mark expected switch fall-throughs
@ 2018-07-04 21:13 Gustavo A. R. Silva
2018-07-05 5:57 ` Ying Xue
2018-07-05 11:24 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-04 21:13 UTC (permalink / raw)
To: Jon Maloy, Ying Xue, David S. Miller
Cc: netdev, tipc-discussion, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Warning level 2 was used: -Wimplicit-fallthrough=2
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
net/tipc/bearer.c | 1 +
net/tipc/link.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 2dfb492..fd6d8f1 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -610,6 +610,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
case NETDEV_CHANGE:
if (netif_carrier_ok(dev))
break;
+ /* else: fall through */
case NETDEV_UP:
test_and_set_bit_lock(0, &b->up);
break;
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 695acb7..6386032 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1063,6 +1063,7 @@ static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
skb_queue_tail(mc_inputq, skb);
return true;
}
+ /* else: fall through */
case CONN_MANAGER:
skb_queue_tail(inputq, skb);
return true;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc: mark expected switch fall-throughs
2018-07-04 21:13 [PATCH] tipc: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-07-05 5:57 ` Ying Xue
2018-07-05 11:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Ying Xue @ 2018-07-05 5:57 UTC (permalink / raw)
To: Gustavo A. R. Silva, Jon Maloy, David S. Miller
Cc: netdev, tipc-discussion, linux-kernel
On 07/05/2018 05:13 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Warning level 2 was used: -Wimplicit-fallthrough=2
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
> ---
> net/tipc/bearer.c | 1 +
> net/tipc/link.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
> index 2dfb492..fd6d8f1 100644
> --- a/net/tipc/bearer.c
> +++ b/net/tipc/bearer.c
> @@ -610,6 +610,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
> case NETDEV_CHANGE:
> if (netif_carrier_ok(dev))
> break;
> + /* else: fall through */
> case NETDEV_UP:
> test_and_set_bit_lock(0, &b->up);
> break;
> diff --git a/net/tipc/link.c b/net/tipc/link.c
> index 695acb7..6386032 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -1063,6 +1063,7 @@ static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
> skb_queue_tail(mc_inputq, skb);
> return true;
> }
> + /* else: fall through */
> case CONN_MANAGER:
> skb_queue_tail(inputq, skb);
> return true;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc: mark expected switch fall-throughs
2018-07-04 21:13 [PATCH] tipc: mark expected switch fall-throughs Gustavo A. R. Silva
2018-07-05 5:57 ` Ying Xue
@ 2018-07-05 11:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-05 11:24 UTC (permalink / raw)
To: gustavo; +Cc: jon.maloy, ying.xue, netdev, tipc-discussion, linux-kernel
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Wed, 4 Jul 2018 16:13:59 -0500
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Warning level 2 was used: -Wimplicit-fallthrough=2
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-05 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04 21:13 [PATCH] tipc: mark expected switch fall-throughs Gustavo A. R. Silva
2018-07-05 5:57 ` Ying Xue
2018-07-05 11:24 ` David Miller
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).