net: sched: mark expected switch fall-throughs
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 19 Oct 2017 21:28:24 +0000 (16:28 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 01:07:08 +0000 (02:07 +0100)
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/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_fq_codel.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 c3b92d62190e7293c18fd7a78b02c336e839065f..6361be7881f108c03335e0245448682f960587d6 100644 (file)
@@ -255,6 +255,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 */
                case TC_ACT_SHOT:
                        return NULL;
                case TC_ACT_RECLASSIFY:
index 753dc7a77b60ead3b702ac07d1b2bc148c417626..5bbcef3dcd8cab49881292aa39ca213e456e7df2 100644 (file)
@@ -321,6 +321,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 */
                case TC_ACT_SHOT:
                        return NULL;
                }
index 3c40edeff1e888234e42182abe0a9e2a432a4fda..0305d791ea943f5c7d108b2e5c877b2e16f0b6a5 100644 (file)
@@ -105,6 +105,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 */
                case TC_ACT_SHOT:
                        return 0;
                }
index a692184bd333a457d7cb39f7e6f41d4006f3e36d..d04068a97d81fd06d138c3ec277ac9309852601e 100644 (file)
@@ -1144,6 +1144,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 */
                case TC_ACT_SHOT:
                        return NULL;
                }
index 57be73c0e1d25084956465fcb16e40c1009cea38..fa0380730ff0513d043e25011181efabd9be8fe5 100644 (file)
@@ -244,6 +244,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 */
                case TC_ACT_SHOT:
                        return NULL;
                }
index 31e0a284eeff963c29d310156d8d4e51860f8c09..012216386c0b74875e39a45449401897e6fdbb54 100644 (file)
@@ -54,6 +54,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 */
        case TC_ACT_SHOT:
                return NULL;
        }
index 95fad348c8d78ad032b529d1d08adda4b5870227..2c79559a0d310eb1d7020270a65139a7c79504d2 100644 (file)
@@ -50,6 +50,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 */
                case TC_ACT_SHOT:
                        return NULL;
                }
index 8694c7b6d2b191d8e909783f31050f735060f77a..6962b37a3ad31d9cfbc4fdf34d63c42871a00506 100644 (file)
@@ -709,6 +709,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 */
                case TC_ACT_SHOT:
                        return NULL;
                }
index 487d375f5a0667b4e8aeec9851c1dd362493f014..0678debdd856f0306448192c63e6d6c5518dc886 100644 (file)
@@ -268,6 +268,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 */
                case TC_ACT_SHOT:
                        return false;
                }
index 5a9c95149c5c16987af57c58e9bfe546cddcc15d..890f4a4564e71355329b7372a3769431ce62dc0b 100644 (file)
@@ -190,6 +190,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 */
                case TC_ACT_SHOT:
                        return 0;
                }