Skip to content

Commit 8eb943f

Browse files
ytcoodeborkmann
authored andcommitted
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 <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Joanne Koong <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent fe4625d commit 8eb943f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/bpf/stackmap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
106106
return ERR_PTR(-ENOMEM);
107107

108108
bpf_map_init_from_attr(&smap->map, attr);
109-
smap->map.value_size = value_size;
110109
smap->n_buckets = n_buckets;
111110

112111
err = get_callchain_buffers(sysctl_perf_event_max_stack);

0 commit comments

Comments
 (0)