[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZMAeH71jT6foAcrarURXmTnDyb-qhJthoh8GqhDZ-PRw@mail.gmail.com>
Date: Mon, 19 Oct 2020 11:28:14 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: trix@...hat.com
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin Lau <kafai@...com>, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
Andrii Nakryiko <andrii@...nel.org>,
john fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bpf: remove unneeded break
On Mon, Oct 19, 2020 at 10:38 AM <trix@...hat.com> wrote:
>
> From: Tom Rix <trix@...hat.com>
>
> A break is not needed if it is preceded by a return
>
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
Probably refactoring left over, looks good:
Acked-by: Andrii Nakryiko <andrii@...nel.org>
> kernel/bpf/syscall.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 1110ecd7d1f3..8f50c9c19f1b 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -2913,7 +2913,6 @@ attach_type_to_prog_type(enum bpf_attach_type attach_type)
> case BPF_CGROUP_INET_INGRESS:
> case BPF_CGROUP_INET_EGRESS:
> return BPF_PROG_TYPE_CGROUP_SKB;
> - break;
> case BPF_CGROUP_INET_SOCK_CREATE:
> case BPF_CGROUP_INET_SOCK_RELEASE:
> case BPF_CGROUP_INET4_POST_BIND:
> --
> 2.18.1
>
Powered by blists - more mailing lists