* [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size
@ 2022-03-23 7:36 Yuntao Wang
2022-03-23 17:26 ` Joanne Koong
2022-04-01 20:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Yuntao Wang @ 2022-03-23 7:36 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, netdev, bpf, linux-kernel, Yuntao Wang
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size
2022-03-23 7:36 [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size Yuntao Wang
@ 2022-03-23 17:26 ` Joanne Koong
2022-04-01 20:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Joanne Koong @ 2022-03-23 17:26 UTC (permalink / raw)
To: Yuntao Wang
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, netdev, bpf, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size
2022-03-23 7:36 [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size Yuntao Wang
2022-03-23 17:26 ` Joanne Koong
@ 2022-04-01 20:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-01 20:50 UTC (permalink / raw)
To: Yuntao Wang
Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh, netdev, bpf, linux-kernel
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-01 20:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 7:36 [PATCH bpf-next] bpf: Remove redundant assignment to smap->map.value_size Yuntao Wang
2022-03-23 17:26 ` Joanne Koong
2022-04-01 20:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.