mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
net: sched: mark expected switch fall-throughs
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>
This commit is contained in:
parent
a05b8c43ac
commit
f3ae608edb
10 changed files with 10 additions and 0 deletions
|
@ -255,6 +255,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
|
||||||
case TC_ACT_STOLEN:
|
case TC_ACT_STOLEN:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
case TC_ACT_RECLASSIFY:
|
case TC_ACT_RECLASSIFY:
|
||||||
|
|
|
@ -321,6 +321,7 @@ static struct drr_class *drr_classify(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
case TC_ACT_STOLEN:
|
case TC_ACT_STOLEN:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,7 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
case TC_ACT_QUEUED:
|
case TC_ACT_QUEUED:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1144,6 +1144,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
|
||||||
case TC_ACT_STOLEN:
|
case TC_ACT_STOLEN:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,6 +244,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
case TC_ACT_STOLEN:
|
case TC_ACT_STOLEN:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
|
||||||
case TC_ACT_QUEUED:
|
case TC_ACT_QUEUED:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
|
||||||
case TC_ACT_QUEUED:
|
case TC_ACT_QUEUED:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -709,6 +709,7 @@ static struct qfq_class *qfq_classify(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
case TC_ACT_STOLEN:
|
case TC_ACT_STOLEN:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,6 +268,7 @@ static bool sfb_classify(struct sk_buff *skb, struct tcf_proto *fl,
|
||||||
case TC_ACT_QUEUED:
|
case TC_ACT_QUEUED:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,6 +190,7 @@ static unsigned int sfq_classify(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
case TC_ACT_QUEUED:
|
case TC_ACT_QUEUED:
|
||||||
case TC_ACT_TRAP:
|
case TC_ACT_TRAP:
|
||||||
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
|
||||||
|
/* fall through */
|
||||||
case TC_ACT_SHOT:
|
case TC_ACT_SHOT:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue