Skip to content

Commit 05bba1e

Browse files
GustavoARSilvadavem330
authored andcommitted
net/af_iucv: mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: net/iucv/af_iucv.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 537:3, 519:6, 2246:6, 510:6 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e1ab243 commit 05bba1e

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎net/iucv/af_iucv.c‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ static void iucv_sock_close(struct sock *sk)
512512
sk->sk_state = IUCV_DISCONN;
513513
sk->sk_state_change(sk);
514514
}
515-
case IUCV_DISCONN: /* fall through */
515+
/* fall through */
516+
517+
case IUCV_DISCONN:
516518
sk->sk_state = IUCV_CLOSING;
517519
sk->sk_state_change(sk);
518520

@@ -525,8 +527,9 @@ static void iucv_sock_close(struct sock *sk)
525527
iucv_sock_in_state(sk, IUCV_CLOSED, 0),
526528
timeo);
527529
}
530+
/* fall through */
528531

529-
case IUCV_CLOSING: /* fall through */
532+
case IUCV_CLOSING:
530533
sk->sk_state = IUCV_CLOSED;
531534
sk->sk_state_change(sk);
532535

@@ -535,8 +538,9 @@ static void iucv_sock_close(struct sock *sk)
535538

536539
skb_queue_purge(&iucv->send_skb_q);
537540
skb_queue_purge(&iucv->backlog_skb_q);
541+
/* fall through */
538542

539-
default: /* fall through */
543+
default:
540544
iucv_sever_path(sk, 1);
541545
}
542546

@@ -2247,10 +2251,10 @@ static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,
22472251
kfree_skb(skb);
22482252
break;
22492253
}
2250-
/* fall through and receive non-zero length data */
2254+
/* fall through - and receive non-zero length data */
22512255
case (AF_IUCV_FLAG_SHT):
22522256
/* shutdown request */
2253-
/* fall through and receive zero length data */
2257+
/* fall through - and receive zero length data */
22542258
case 0:
22552259
/* plain data frame */
22562260
IUCV_SKB_CB(skb)->class = trans_hdr->iucv_hdr.class;

0 commit comments

Comments
 (0)