net/sched: Use fallthrough pseudo-keyword

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>
This commit is contained in:
Gustavo A. R. Silva 2020-07-07 12:21:38 -05:00 committed by David S. Miller
parent 535094a0c9
commit 964201de69
14 changed files with 15 additions and 14 deletions

View File

@ -598,7 +598,8 @@ static int tcf_csum_act(struct sk_buff *skb, const struct tc_action *a,
if (!tcf_csum_ipv6(skb, update_flags)) if (!tcf_csum_ipv6(skb, update_flags))
goto drop; goto drop;
break; 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): case cpu_to_be16(ETH_P_8021Q):
if (skb_vlan_tag_present(skb) && !orig_vlan_tag_present) { if (skb_vlan_tag_present(skb) && !orig_vlan_tag_present) {
protocol = skb->protocol; protocol = skb->protocol;

View 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. */ /* Non-ICMP, fall thru to initialize if needed. */
/* fall through */ fallthrough;
case IP_CT_NEW: case IP_CT_NEW:
/* Seen it before? This can happen for loopback, retrans, /* Seen it before? This can happen for loopback, retrans,
* or local packets. * or local packets.

View File

@ -250,7 +250,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
case TC_ACT_RECLASSIFY: case TC_ACT_RECLASSIFY:

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return 0; return 0;
} }

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return 0; return 0;
} }

View File

@ -1136,7 +1136,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View File

@ -43,7 +43,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View File

@ -46,7 +46,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View 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_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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return NULL; return NULL;
} }

View File

@ -265,7 +265,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return false; return false;
} }

View File

@ -186,7 +186,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 */ fallthrough;
case TC_ACT_SHOT: case TC_ACT_SHOT:
return 0; return 0;
} }