Skip to content

Commit

Permalink
bpf: Remove redundant intiialization of variable stype
Browse files Browse the repository at this point in the history
The variable stype is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210721115630.109279-1-colin.king@canonical.com
  • Loading branch information
Colin Ian King authored and Andrii Nakryiko committed Jul 22, 2021
1 parent 16c5900 commit 724f17b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/bpf/local_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static int cgroup_storage_check_btf(const struct bpf_map *map,
static void cgroup_storage_seq_show_elem(struct bpf_map *map, void *key,
struct seq_file *m)
{
enum bpf_cgroup_storage_type stype = cgroup_storage_type(map);
enum bpf_cgroup_storage_type stype;
struct bpf_cgroup_storage *storage;
int cpu;

Expand Down

0 comments on commit 724f17b

Please sign in to comment.