diff options
author | Yuntao Wang <ytcoode@gmail.com> | 2022-03-23 08:36:26 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-04-01 22:44:44 +0200 |
commit | 8eb943fc5e5fa62751248302fe8f6c9856d81c09 (patch) | |
tree | 0ac38afb203abfa570d4d3dc2dfbdd3478e48e5c /kernel/bpf/stackmap.c | |
parent | selftests/bpf: Remove unused variable from bpf_sk_assign test (diff) | |
download | linux-8eb943fc5e5fa62751248302fe8f6c9856d81c09.tar.xz linux-8eb943fc5e5fa62751248302fe8f6c9856d81c09.zip |
bpf: Remove redundant assignment to smap->map.value_size
The attr->value_size is already assigned to smap->map.value_size
in bpf_map_init_from_attr(), there is no need to do it again in
stack_map_alloc().
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://lore.kernel.org/bpf/20220323073626.958652-1-ytcoode@gmail.com
Diffstat (limited to 'kernel/bpf/stackmap.c')
-rw-r--r-- | kernel/bpf/stackmap.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 34725bfa1e97..6131b4a19572 100644 --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c @@ -106,7 +106,6 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr) return ERR_PTR(-ENOMEM); bpf_map_init_from_attr(&smap->map, attr); - smap->map.value_size = value_size; smap->n_buckets = n_buckets; err = get_callchain_buffers(sysctl_perf_event_max_stack); |