]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net/sched: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 7 Jul 2020 17:21:38 +0000 (12:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jul 2020 22:47:46 +0000 (15:47 -0700)
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>
14 files changed:
net/sched/act_csum.c
net/sched/act_ct.c
net/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_ets.c
net/sched/sch_fq_codel.c
net/sched/sch_fq_pie.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
net/sched/sch_qfq.c
net/sched/sch_sfb.c
net/sched/sch_sfq.c

index cb8608f0a77a2a88671da430c79399c1fab0d77d..9035355e867f31dabdeb0bc4638728261336007b 100644 (file)
@@ -598,7 +598,8 @@ again:
                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;
index 1b9c6d4a1b6b0714b3d5a5692010fa3f34cca18d..fadfd6b0033b8b4cde26203e336a6c94ee65542e 100644 (file)
@@ -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.
index 052d4a1af69a4fb9f9480e53fc8190aed6f667f6..9e16fdf47fe7a383434fd27975e1b4f037af770b 100644 (file)
@@ -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:
index 0d5c9a8ec61dab0f9fa66775bd9e0cfbd4c82b23..ad14df2ecf3ac858a718efd7cc6c8279aa45049b 100644 (file)
@@ -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;
                }
index 373dc5855d4e81a76c0c9b6cb81a338d6588d1de..1af86f30b18efb0669bb44b3ef28fbfaf2aa39d6 100644 (file)
@@ -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;
                }
index 6bf979f955091731da639ca7fbe241b2e76d61ee..bca016ffc069b9a4473a23fa3c2c86b00bc92dc2 100644 (file)
@@ -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;
                }
index a27a250ab8f9a88e02672be30fa1a59236121d7a..741840b9994f6a96147b6a1cf94a410c970a25e8 100644 (file)
@@ -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;
                }
index 7f6670044f0a917a487d7ac94a2fc756fd673a0e..13ba8648bb6339cd448ef53f9489e82a36f49e38 100644 (file)
@@ -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;
                }
index 52fc513688b1b127c7018d9c949920524dc6f654..b07f29059f47d411c45b2d41bc18972f185b4cac 100644 (file)
@@ -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;
                }
index 648611f5c10523626727317d5fd96f3411aef989..56bdc4bcdc6348bc87557efc8847a064fa8d4da4 100644 (file)
@@ -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;
        }
index a3e187f2603c0eeef0200227571e33fe6feb824e..46b7ce81c6e31ef0f9cdd5228a342a85e3a5c30c 100644 (file)
@@ -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;
                }
index ede854516825c6dc84e222a96e6cf72f33eb88a2..3cfe6262eb00dc00c6dcfcb5518427825094b24a 100644 (file)
@@ -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;
                }
index d2a6e78262bbcea648a0393ed3dde37cd9f77fcc..356f6d1d30db5af4e051568811ccd808a87807b3 100644 (file)
@@ -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;
                }
index 46cdefd69e44dd4cfcd96082d967977171632406..a1314510dc69f7aacb0ab37be6fd1b10d651ca9a 100644 (file)
@@ -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;
                }