Skip to content

Commit 964201d

Browse files
GustavoARSilvadavem330
authored andcommitted
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. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 535094a commit 964201d

File tree

14 files changed

+15
-14
lines changed

14 files changed

+15
-14
lines changed

net/sched/act_csum.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ static int tcf_csum_act(struct sk_buff *skb, const struct tc_action *a,
598598
if (!tcf_csum_ipv6(skb, update_flags))
599599
goto drop;
600600
break;
601-
case cpu_to_be16(ETH_P_8021AD): /* fall through */
601+
case cpu_to_be16(ETH_P_8021AD):
602+
fallthrough;
602603
case cpu_to_be16(ETH_P_8021Q):
603604
if (skb_vlan_tag_present(skb) && !orig_vlan_tag_present) {
604605
protocol = skb->protocol;

net/sched/act_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static int ct_nat_execute(struct sk_buff *skb, struct nf_conn *ct,
783783
}
784784
}
785785
/* Non-ICMP, fall thru to initialize if needed. */
786-
/* fall through */
786+
fallthrough;
787787
case IP_CT_NEW:
788788
/* Seen it before? This can happen for loopback, retrans,
789789
* or local packets.

net/sched/sch_cbq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
250250
case TC_ACT_STOLEN:
251251
case TC_ACT_TRAP:
252252
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
253-
/* fall through */
253+
fallthrough;
254254
case TC_ACT_SHOT:
255255
return NULL;
256256
case TC_ACT_RECLASSIFY:

net/sched/sch_drr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static struct drr_class *drr_classify(struct sk_buff *skb, struct Qdisc *sch,
324324
case TC_ACT_STOLEN:
325325
case TC_ACT_TRAP:
326326
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
327-
/* fall through */
327+
fallthrough;
328328
case TC_ACT_SHOT:
329329
return NULL;
330330
}

net/sched/sch_ets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ static struct ets_class *ets_classify(struct sk_buff *skb, struct Qdisc *sch,
397397
case TC_ACT_QUEUED:
398398
case TC_ACT_TRAP:
399399
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
400-
/* fall through */
400+
fallthrough;
401401
case TC_ACT_SHOT:
402402
return NULL;
403403
}

net/sched/sch_fq_codel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
9999
case TC_ACT_QUEUED:
100100
case TC_ACT_TRAP:
101101
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
102-
/* fall through */
102+
fallthrough;
103103
case TC_ACT_SHOT:
104104
return 0;
105105
}

net/sched/sch_fq_pie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static unsigned int fq_pie_classify(struct sk_buff *skb, struct Qdisc *sch,
102102
case TC_ACT_QUEUED:
103103
case TC_ACT_TRAP:
104104
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
105-
/* fall through */
105+
fallthrough;
106106
case TC_ACT_SHOT:
107107
return 0;
108108
}

net/sched/sch_hfsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
11361136
case TC_ACT_STOLEN:
11371137
case TC_ACT_TRAP:
11381138
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
1139-
/* fall through */
1139+
fallthrough;
11401140
case TC_ACT_SHOT:
11411141
return NULL;
11421142
}

net/sched/sch_htb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
239239
case TC_ACT_STOLEN:
240240
case TC_ACT_TRAP:
241241
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
242-
/* fall through */
242+
fallthrough;
243243
case TC_ACT_SHOT:
244244
return NULL;
245245
}

net/sched/sch_multiq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
4343
case TC_ACT_QUEUED:
4444
case TC_ACT_TRAP:
4545
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
46-
/* fall through */
46+
fallthrough;
4747
case TC_ACT_SHOT:
4848
return NULL;
4949
}

0 commit comments

Comments
 (0)