mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
BACKPORT: treewide: 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. Only apply changes to bpf, not treewide. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Change-Id: I56f83316fa51615b5e0bc37762f321223f7c1a7f Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
This commit is contained in:
parent
5beaa755e5
commit
2557da9098
4 changed files with 4 additions and 4 deletions
|
|
@ -1855,7 +1855,7 @@ static bool cg_sockopt_is_valid_access(int off, int size,
|
|||
return prog->expected_attach_type ==
|
||||
BPF_CGROUP_GETSOCKOPT;
|
||||
case offsetof(struct bpf_sockopt, optname):
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
case offsetof(struct bpf_sockopt, level):
|
||||
if (size != size_default)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu,
|
|||
break;
|
||||
default:
|
||||
bpf_warn_invalid_xdp_action(act);
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
case XDP_DROP:
|
||||
xdp_return_frame(xdpf);
|
||||
stats->drop++;
|
||||
|
|
|
|||
|
|
@ -2056,7 +2056,7 @@ bpf_prog_load_check_attach(enum bpf_prog_type prog_type,
|
|||
case BPF_PROG_TYPE_EXT:
|
||||
if (expected_attach_type)
|
||||
return -EINVAL;
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12398,7 +12398,7 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
|
|||
default:
|
||||
if (!prog_extension)
|
||||
return -EINVAL;
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
case BPF_MODIFY_RETURN:
|
||||
case BPF_LSM_MAC:
|
||||
case BPF_TRACE_FENTRY:
|
||||
|
|
|
|||
Loading…
Reference in a new issue