From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][bpf-next] bpf: remove redundant variable old_flags
Date: Wed, 11 Oct 2017 11:15:49 -0700 [thread overview]
Message-ID: <20171011181548.xcdz7s44h5lo4pu2@ast-mbp> (raw)
In-Reply-To: <20171011105623.19998-1-colin.king@canonical.com>
On Wed, Oct 11, 2017 at 11:56:23AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable old_flags is being assigned but is never read; it is redundant
> and can be removed.
>
> Cleans up clang warning: Value stored to 'old_flags' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> kernel/bpf/cgroup.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> index e88abc0865d5..3db5a17fcfe8 100644
> --- a/kernel/bpf/cgroup.c
> +++ b/kernel/bpf/cgroup.c
> @@ -192,7 +192,6 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
> struct cgroup_subsys_state *css;
> struct bpf_prog_list *pl;
> bool pl_was_allocated;
> - u32 old_flags;
> int err;
>
> if ((flags & BPF_F_ALLOW_OVERRIDE) && (flags & BPF_F_ALLOW_MULTI))
> @@ -239,7 +238,6 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
> pl->prog = prog;
> }
>
> - old_flags = cgrp->bpf.flags[type];
Acked-by: Alexei Starovoitov <ast@kernel.org>
thanks for the cleanup. That was a leftover of one of the previous
experiments I did.
The patch is for net-next.
next prev parent reply other threads:[~2017-10-11 18:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 10:56 [PATCH][bpf-next] bpf: remove redundant variable old_flags Colin King
2017-10-11 18:15 ` Alexei Starovoitov [this message]
2017-10-11 22:19 ` Daniel Borkmann
2017-10-12 3:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171011181548.xcdz7s44h5lo4pu2@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=ast@kernel.org \
--cc=colin.king@canonical.com \
--cc=daniel@iogearbox.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox