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 c3b92d6..6361be7 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 753dc7a..5bbcef3 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 3c40ede..0305d79 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 a692184..d04068a 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 57be73c..fa03807 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 31e0a28..0122163 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 95fad34..2c79559 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 8694c7b..6962b37 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 487d375..0678deb 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 5a9c951..890f4a4 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;
                }