Skip to content

Commit

Permalink
net: sched: mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo A. R. Silva authored and David S. Miller committed Oct 22, 2017
1 parent a05b8c4 commit f3ae608
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_drr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_fq_codel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_hfsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_multiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_prio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_qfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_sfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_sfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f3ae608

Please sign in to comment.