lkml.org 
[lkml]   [2020]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] bpf: Convert to use the preferred fallthrough macro
On Fri, Aug 14, 2020 at 2:58 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> Convert the uses of fallthrough comments to fallthrough macro.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> kernel/bpf/cgroup.c | 2 +-
> kernel/bpf/cpumap.c | 2 +-
> kernel/bpf/syscall.c | 2 +-
> kernel/bpf/verifier.c | 6 +++---
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> index 83ff127ef7ae..e21de4f1754c 100644
> --- a/kernel/bpf/cgroup.c
> +++ b/kernel/bpf/cgroup.c
> @@ -1794,7 +1794,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;

this fallthrough is not event necessary, let's drop it instead?

> case offsetof(struct bpf_sockopt, level):
> if (size != size_default)
> return false;

[...]

\
 
 \ /
  Last update: 2020-08-14 19:12    [W:0.033 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site