From: Yuntao Wang Date: Wed, 23 Mar 2022 07:36:26 +0000 (+0800) Subject: bpf: Remove redundant assignment to smap->map.value_size X-Git-Tag: v6.6.17~7459^2~363^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8eb943fc5e5fa62751248302fe8f6c9856d81c09;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Daniel Borkmann Acked-by: Joanne Koong Link: https://lore.kernel.org/bpf/20220323073626.958652-1-ytcoode@gmail.com --- diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 34725bf..6131b4a 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);