Message ID | 20220323073626.958652-1-ytcoode@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8eb943fc5e5fa62751248302fe8f6c9856d81c09 |
Delegated to: | BPF |
Headers | show |
Series | [bpf-next] bpf: Remove redundant assignment to smap->map.value_size | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for bpf-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Single patches do not need cover letters |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 2 this patch: 2 |
netdev/cc_maintainers | success | CCed 10 of 10 maintainers |
netdev/build_clang | success | Errors and warnings before: 18 this patch: 18 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 7 this patch: 7 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
bpf/vmtest-bpf-next-PR | fail | PR summary |
On Wed, Mar 23, 2022 at 2:21 AM Yuntao Wang <ytcoode@gmail.com> wrote: > > 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> LGTM. Acked-by: Joanne Koong <joannelkoong@gmail.com> > --- > kernel/bpf/stackmap.c | 1 - > 1 file changed, 1 deletion(-) > > 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); > -- > 2.35.0.rc2 >
Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <daniel@iogearbox.net>: On Wed, 23 Mar 2022 15:36:26 +0800 you wrote: > 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> > --- > kernel/bpf/stackmap.c | 1 - > 1 file changed, 1 deletion(-) Here is the summary with links: - [bpf-next] bpf: Remove redundant assignment to smap->map.value_size https://git.kernel.org/bpf/bpf-next/c/8eb943fc5e5f You are awesome, thank you!
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);
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> --- kernel/bpf/stackmap.c | 1 - 1 file changed, 1 deletion(-)