Skip to content

Commit

Permalink
bpf: remove redundant variable old_flags
Browse files Browse the repository at this point in the history
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>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Oct 12, 2017
1 parent df24cd4 commit 952925d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/bpf/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -239,7 +238,6 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
pl->prog = prog;
}

old_flags = cgrp->bpf.flags[type];
cgrp->bpf.flags[type] = flags;

/* allocate and recompute effective prog arrays */
Expand Down

0 comments on commit 952925d

Please sign in to comment.