* [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show()
@ 2022-04-10 6:00 Yuntao Wang
2022-04-11 5:27 ` Song Liu
2022-04-11 19:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Yuntao Wang @ 2022-04-10 6:00 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 seq argument is assigned to meta.seq twice, the second one is
redundant, remove it.
This patch also removes a redundant space in bpf_iter_link_attach().
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
---
kernel/bpf/bpf_iter.c | 2 +-
kernel/bpf/task_iter.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index dea920b3b840..d5d96ceca105 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -545,7 +545,7 @@ int bpf_iter_link_attach(const union bpf_attr *attr, bpfptr_t uattr,
bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog);
link->tinfo = tinfo;
- err = bpf_link_prime(&link->link, &link_primer);
+ err = bpf_link_prime(&link->link, &link_primer);
if (err) {
kfree(link);
return err;
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index d94696198ef8..8c921799def4 100644
--- a/kernel/bpf/task_iter.c
+++ b/kernel/bpf/task_iter.c
@@ -99,7 +99,6 @@ static int __task_seq_show(struct seq_file *seq, struct task_struct *task,
if (!prog)
return 0;
- meta.seq = seq;
ctx.meta = &meta;
ctx.task = task;
return bpf_iter_run_prog(prog, &ctx);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show()
2022-04-10 6:00 [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show() Yuntao Wang
@ 2022-04-11 5:27 ` Song Liu
2022-04-11 19:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Song Liu @ 2022-04-11 5:27 UTC (permalink / raw)
To: Yuntao Wang
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Networking, bpf, open list
On Sat, Apr 9, 2022 at 11:00 PM Yuntao Wang <ytcoode@gmail.com> wrote:
>
> The seq argument is assigned to meta.seq twice, the second one is
> redundant, remove it.
>
> This patch also removes a redundant space in bpf_iter_link_attach().
>
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show()
2022-04-10 6:00 [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show() Yuntao Wang
2022-04-11 5:27 ` Song Liu
@ 2022-04-11 19:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-11 19:20 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 Sun, 10 Apr 2022 14:00:19 +0800 you wrote:
> The seq argument is assigned to meta.seq twice, the second one is
> redundant, remove it.
>
> This patch also removes a redundant space in bpf_iter_link_attach().
>
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show()
https://git.kernel.org/bpf/bpf-next/c/aa1b02e674fe
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-11 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-10 6:00 [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show() Yuntao Wang
2022-04-11 5:27 ` Song Liu
2022-04-11 19:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).