Commit 1aecbf18 authored by Miaohe Lin's avatar Miaohe Lin Committed by David S. Miller

net: dccp: Convert to use the preferred fallthrough macro

Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3478f90c
...@@ -608,7 +608,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk, ...@@ -608,7 +608,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk,
*/ */
if (hc->rx_x_recv > 0) if (hc->rx_x_recv > 0)
break; break;
/* fall through */ fallthrough;
case CCID3_FBACK_PERIODIC: case CCID3_FBACK_PERIODIC:
delta = ktime_us_delta(now, hc->rx_tstamp_last_feedback); delta = ktime_us_delta(now, hc->rx_tstamp_last_feedback);
if (delta <= 0) if (delta <= 0)
......
...@@ -1407,7 +1407,8 @@ int dccp_feat_parse_options(struct sock *sk, struct dccp_request_sock *dreq, ...@@ -1407,7 +1407,8 @@ int dccp_feat_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
* Negotiation during connection setup * Negotiation during connection setup
*/ */
case DCCP_LISTEN: case DCCP_LISTEN:
server = true; /* fall through */ server = true;
fallthrough;
case DCCP_REQUESTING: case DCCP_REQUESTING:
switch (opt) { switch (opt) {
case DCCPO_CHANGE_L: case DCCPO_CHANGE_L:
......
...@@ -64,7 +64,7 @@ static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb) ...@@ -64,7 +64,7 @@ static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb)
*/ */
if (dccp_sk(sk)->dccps_role != DCCP_ROLE_CLIENT) if (dccp_sk(sk)->dccps_role != DCCP_ROLE_CLIENT)
break; break;
/* fall through */ fallthrough;
case DCCP_REQUESTING: case DCCP_REQUESTING:
case DCCP_ACTIVE_CLOSEREQ: case DCCP_ACTIVE_CLOSEREQ:
dccp_send_reset(sk, DCCP_RESET_CODE_CLOSED); dccp_send_reset(sk, DCCP_RESET_CODE_CLOSED);
...@@ -76,7 +76,7 @@ static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb) ...@@ -76,7 +76,7 @@ static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb)
queued = 1; queued = 1;
dccp_fin(sk, skb); dccp_fin(sk, skb);
dccp_set_state(sk, DCCP_PASSIVE_CLOSE); dccp_set_state(sk, DCCP_PASSIVE_CLOSE);
/* fall through */ fallthrough;
case DCCP_PASSIVE_CLOSE: case DCCP_PASSIVE_CLOSE:
/* /*
* Retransmitted Close: we have already enqueued the first one. * Retransmitted Close: we have already enqueued the first one.
...@@ -113,7 +113,7 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb) ...@@ -113,7 +113,7 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb)
queued = 1; queued = 1;
dccp_fin(sk, skb); dccp_fin(sk, skb);
dccp_set_state(sk, DCCP_PASSIVE_CLOSEREQ); dccp_set_state(sk, DCCP_PASSIVE_CLOSEREQ);
/* fall through */ fallthrough;
case DCCP_PASSIVE_CLOSEREQ: case DCCP_PASSIVE_CLOSEREQ:
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP);
} }
...@@ -530,7 +530,7 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk, ...@@ -530,7 +530,7 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
case DCCP_PKT_DATA: case DCCP_PKT_DATA:
if (sk->sk_state == DCCP_RESPOND) if (sk->sk_state == DCCP_RESPOND)
break; break;
/* fall through */ fallthrough;
case DCCP_PKT_DATAACK: case DCCP_PKT_DATAACK:
case DCCP_PKT_ACK: case DCCP_PKT_ACK:
/* /*
...@@ -684,7 +684,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -684,7 +684,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
/* Step 8: if using Ack Vectors, mark packet acknowledgeable */ /* Step 8: if using Ack Vectors, mark packet acknowledgeable */
dccp_handle_ackvec_processing(sk, skb); dccp_handle_ackvec_processing(sk, skb);
dccp_deliver_input_to_ccids(sk, skb); dccp_deliver_input_to_ccids(sk, skb);
/* fall through */ fallthrough;
case DCCP_RESPOND: case DCCP_RESPOND:
queued = dccp_rcv_respond_partopen_state_process(sk, skb, queued = dccp_rcv_respond_partopen_state_process(sk, skb,
dh, len); dh, len);
......
...@@ -225,7 +225,7 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, ...@@ -225,7 +225,7 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
* interested. The RX CCID need not parse Ack Vectors, * interested. The RX CCID need not parse Ack Vectors,
* since it is only interested in clearing old state. * since it is only interested in clearing old state.
*/ */
/* fall through */ fallthrough;
case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC: case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC:
if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk, if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk,
pkt_type, opt, value, len)) pkt_type, opt, value, len))
......
...@@ -62,7 +62,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -62,7 +62,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
switch (dcb->dccpd_type) { switch (dcb->dccpd_type) {
case DCCP_PKT_DATA: case DCCP_PKT_DATA:
set_ack = 0; set_ack = 0;
/* fall through */ fallthrough;
case DCCP_PKT_DATAACK: case DCCP_PKT_DATAACK:
case DCCP_PKT_RESET: case DCCP_PKT_RESET:
break; break;
...@@ -72,12 +72,12 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -72,12 +72,12 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
/* Use ISS on the first (non-retransmitted) Request. */ /* Use ISS on the first (non-retransmitted) Request. */
if (icsk->icsk_retransmits == 0) if (icsk->icsk_retransmits == 0)
dcb->dccpd_seq = dp->dccps_iss; dcb->dccpd_seq = dp->dccps_iss;
/* fall through */ fallthrough;
case DCCP_PKT_SYNC: case DCCP_PKT_SYNC:
case DCCP_PKT_SYNCACK: case DCCP_PKT_SYNCACK:
ackno = dcb->dccpd_ack_seq; ackno = dcb->dccpd_ack_seq;
/* fall through */ fallthrough;
default: default:
/* /*
* Set owner/destructor: some skbs are allocated via * Set owner/destructor: some skbs are allocated via
...@@ -481,7 +481,7 @@ struct sk_buff *dccp_ctl_make_reset(struct sock *sk, struct sk_buff *rcv_skb) ...@@ -481,7 +481,7 @@ struct sk_buff *dccp_ctl_make_reset(struct sock *sk, struct sk_buff *rcv_skb)
case DCCP_RESET_CODE_PACKET_ERROR: case DCCP_RESET_CODE_PACKET_ERROR:
dhr->dccph_reset_data[0] = rxdh->dccph_type; dhr->dccph_reset_data[0] = rxdh->dccph_type;
break; break;
case DCCP_RESET_CODE_OPTION_ERROR: /* fall through */ case DCCP_RESET_CODE_OPTION_ERROR:
case DCCP_RESET_CODE_MANDATORY_ERROR: case DCCP_RESET_CODE_MANDATORY_ERROR:
memcpy(dhr->dccph_reset_data, dcb->dccpd_reset_data, 3); memcpy(dhr->dccph_reset_data, dcb->dccpd_reset_data, 3);
break; break;
......
...@@ -101,7 +101,7 @@ void dccp_set_state(struct sock *sk, const int state) ...@@ -101,7 +101,7 @@ void dccp_set_state(struct sock *sk, const int state)
if (inet_csk(sk)->icsk_bind_hash != NULL && if (inet_csk(sk)->icsk_bind_hash != NULL &&
!(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) !(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
inet_put_port(sk); inet_put_port(sk);
/* fall through */ fallthrough;
default: default:
if (oldstate == DCCP_OPEN) if (oldstate == DCCP_OPEN)
DCCP_DEC_STATS(DCCP_MIB_CURRESTAB); DCCP_DEC_STATS(DCCP_MIB_CURRESTAB);
...@@ -834,7 +834,7 @@ int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, ...@@ -834,7 +834,7 @@ int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
case DCCP_PKT_CLOSEREQ: case DCCP_PKT_CLOSEREQ:
if (!(flags & MSG_PEEK)) if (!(flags & MSG_PEEK))
dccp_finish_passive_close(sk); dccp_finish_passive_close(sk);
/* fall through */ fallthrough;
case DCCP_PKT_RESET: case DCCP_PKT_RESET:
dccp_pr_debug("found fin (%s) ok!\n", dccp_pr_debug("found fin (%s) ok!\n",
dccp_packet_name(dh->dccph_type)); dccp_packet_name(dh->dccph_type));
...@@ -960,7 +960,7 @@ static void dccp_terminate_connection(struct sock *sk) ...@@ -960,7 +960,7 @@ static void dccp_terminate_connection(struct sock *sk)
case DCCP_PARTOPEN: case DCCP_PARTOPEN:
dccp_pr_debug("Stop PARTOPEN timer (%p)\n", sk); dccp_pr_debug("Stop PARTOPEN timer (%p)\n", sk);
inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK); inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK);
/* fall through */ fallthrough;
case DCCP_OPEN: case DCCP_OPEN:
dccp_send_close(sk, 1); dccp_send_close(sk, 1);
...@@ -969,7 +969,7 @@ static void dccp_terminate_connection(struct sock *sk) ...@@ -969,7 +969,7 @@ static void dccp_terminate_connection(struct sock *sk)
next_state = DCCP_ACTIVE_CLOSEREQ; next_state = DCCP_ACTIVE_CLOSEREQ;
else else
next_state = DCCP_CLOSING; next_state = DCCP_CLOSING;
/* fall through */ fallthrough;
default: default:
dccp_set_state(sk, next_state); dccp_set_state(sk, next_state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment