net/sched: Use fallthrough pseudo-keyword
Subsystems (3)
PATCH 1/1 net/sched: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
--- net/sched/act_csum.c | 3 ++- net/sched/act_ct.c | 2 +- net/sched/sch_cbq.c | 2 +- net/sched/sch_drr.c | 2 +- net/sched/sch_ets.c | 2 +- net/sched/sch_fq_codel.c | 2 +- net/sched/sch_fq_pie.c | 2 +- net/sched/sch_hfsc.c | 2 +- net/sched/sch_htb.c | 2 +- net/sched/sch_multiq.c | 2 +- net/sched/sch_prio.c | 2 +- net/sched/sch_qfq.c | 2 +- net/sched/sch_sfb.c | 2 +- net/sched/sch_sfq.c | 2 +- 14 files changed, 15 insertions(+), 14 deletions(-)
net/sched/act_csum.c +2 -1
@@ -598,7 +598,8 @@ static int tcf_csum_act(struct sk_buff *skb, const struct tc_action *a,if (!tcf_csum_ipv6 (skb, update_flags)) goto drop;break ; -case cpu_to_be16 (ETH_P_8021AD ):/* fall through */ +case cpu_to_be16 (ETH_P_8021AD ): + fallthrough;case cpu_to_be16 (ETH_P_8021Q ):if (skb_vlan_tag_present (skb) && !orig_vlan_tag_present) { protocol = skb->protocol;
net/sched/act_ct.c +1 -1
@@ -783,7 +783,7 @@ static int ct_nat_execute(struct sk_buff *skb, struct nf_conn *ct, } }/* Non-ICMP, fall thru to initialize if needed. */ -/* fall through */ + fallthrough;case IP_CT_NEW :/* Seen it before? This can happen for loopback, retrans, * or local packets.
net/sched/sch_cbq.c +1 -1
@@ -250,7 +250,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)case TC_ACT_STOLEN :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ;case TC_ACT_RECLASSIFY :
net/sched/sch_drr.c +1 -1
@@ -324,7 +324,7 @@ static struct drr_class *drr_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_STOLEN :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_ets.c +1 -1
@@ -397,7 +397,7 @@ static struct ets_class *ets_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_fq_codel.c +1 -1
@@ -99,7 +99,7 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return 0 ; }
net/sched/sch_fq_pie.c +1 -1
@@ -102,7 +102,7 @@ static unsigned int fq_pie_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return 0 ; }
net/sched/sch_hfsc.c +1 -1
@@ -1136,7 +1136,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)case TC_ACT_STOLEN :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_htb.c +1 -1
@@ -239,7 +239,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_STOLEN :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_multiq.c +1 -1
@@ -43,7 +43,7 @@ multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_prio.c +1 -1
@@ -46,7 +46,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_qfq.c +1 -1
@@ -699,7 +699,7 @@ static struct qfq_class *qfq_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_STOLEN :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return NULL ; }
net/sched/sch_sfb.c +1 -1
@@ -265,7 +265,7 @@ static bool sfb_classify(struct sk_buff *skb, struct tcf_proto *fl,case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return false; }
net/sched/sch_sfq.c +1 -1
@@ -186,7 +186,7 @@ static unsigned int sfq_classify(struct sk_buff *skb, struct Qdisc *sch,case TC_ACT_QUEUED :case TC_ACT_TRAP : *qerr =NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; -/* fall through */ + fallthrough;case TC_ACT_SHOT :return 0 ; }
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 7 Jul 2020 12:21:38 -0500
Quoted 7 lines
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied, thanks.
Quoted 7 lines · David Miller
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 7 Jul 2020 12:21:38 -0500Quoted 4 lines
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Gustavo A. R. Silva <[email protected]>Applied, thanks.
Thanks, Dave.
--
Gustavo