Commit 954d8297 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Pablo Neira Ayuso
Browse files

netfilter: 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: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 35dfb013
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1935,7 +1935,7 @@ static int compat_mtw_from_user(const struct compat_ebt_entry_mwt *mwt,
			size_kern = match_size;
		module_put(match->me);
		break;
	case EBT_COMPAT_WATCHER: /* fallthrough */
	case EBT_COMPAT_WATCHER:
	case EBT_COMPAT_TARGET:
		wt = xt_request_find_target(NFPROTO_BRIDGE, name,
					    mwt->u.revision);
+1 −1
Original line number Diff line number Diff line
@@ -1644,7 +1644,7 @@ ip_set_dump_do(struct sk_buff *skb, struct netlink_callback *cb)
				goto next_set;
			if (set->variant->uref)
				set->variant->uref(set, cb, true);
			/* fall through */
			fallthrough;
		default:
			ret = set->variant->list(set, skb, cb);
			if (!cb->args[IPSET_CB_ARG0])
+3 −3
Original line number Diff line number Diff line
@@ -257,15 +257,15 @@ static unsigned int get_uint(struct bitstr *bs, int b)
	case 4:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
		fallthrough;
	case 3:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
		fallthrough;
	case 2:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
		fallthrough;
	case 1:
		v |= *bs->cur++;
		break;
+1 −1
Original line number Diff line number Diff line
@@ -610,7 +610,7 @@ void nf_ct_netns_put(struct net *net, uint8_t nfproto)
	switch (nfproto) {
	case NFPROTO_BRIDGE:
		nf_ct_netns_do_put(net, NFPROTO_BRIDGE);
		/* fall through */
		fallthrough;
	case NFPROTO_INET:
		nf_ct_netns_do_put(net, NFPROTO_IPV4);
		nf_ct_netns_do_put(net, NFPROTO_IPV6);
+1 −1
Original line number Diff line number Diff line
@@ -900,7 +900,7 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,
				return -NF_REPEAT;
			return NF_DROP;
		}
		/* Fall through */
		fallthrough;
	case TCP_CONNTRACK_IGNORE:
		/* Ignored packets:
		 *
Loading