net: rxrpc: mark expected switch fall-throughs
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 19 Oct 2017 21:54:48 +0000 (16:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Oct 2017 09:27:06 +0000 (18:27 +0900)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/af_rxrpc.c
net/rxrpc/input.c
net/rxrpc/sendmsg.c

index 054e32872808553f7d51a71d5b0d8ac985ef0ff0..344b2dcad52d631e06f6aada82e133c2231acef1 100644 (file)
@@ -246,6 +246,7 @@ static int rxrpc_listen(struct socket *sock, int backlog)
                        ret = 0;
                        break;
                }
+               /* Fall through */
        default:
                ret = -EBUSY;
                break;
@@ -560,6 +561,7 @@ static int rxrpc_sendmsg(struct socket *sock, struct msghdr *m, size_t len)
                        m->msg_name = &rx->connect_srx;
                        m->msg_namelen = sizeof(rx->connect_srx);
                }
+               /* Fall through */
        case RXRPC_SERVER_BOUND:
        case RXRPC_SERVER_LISTENING:
                ret = rxrpc_do_sendmsg(rx, m, len);
index e56e23ed2229c8568f839cdda32ade1ade0eaee7..1e37eb1c0c6600be7db2eed96176fc7393fd6e04 100644 (file)
@@ -1125,6 +1125,7 @@ void rxrpc_data_ready(struct sock *udp_sk)
        case RXRPC_PACKET_TYPE_BUSY:
                if (sp->hdr.flags & RXRPC_CLIENT_INITIATED)
                        goto discard;
+               /* Fall through */
 
        case RXRPC_PACKET_TYPE_DATA:
                if (sp->hdr.callNumber == 0)
index 2d9edc656ca381e22b57c8cd0cfd6efab2d10519..7d2595582c094cf4b30a93e1148227d6480c202e 100644 (file)
@@ -220,6 +220,7 @@ static void rxrpc_queue_packet(struct rxrpc_sock *rx, struct rxrpc_call *call,
                                          ktime_get_real());
                        if (!last)
                                break;
+                       /* Fall through */
                case RXRPC_CALL_SERVER_SEND_REPLY:
                        call->state = RXRPC_CALL_SERVER_AWAIT_ACK;
                        rxrpc_notify_end_tx(rx, call, notify_end_tx);