BPF List
 help / color / mirror / Atom feed
* [PATCH] bpf: Remove unused MT_ENTRY define
@ 2024-12-23 11:59 Lorenzo Pieralisi
  2024-12-30 23:19 ` Alexei Starovoitov
  2024-12-30 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2024-12-23 11:59 UTC (permalink / raw)
  To: bpf; +Cc: linux-kernel, Andrii Nakryiko, Alexei Starovoitov,
	Daniel Borkmann

The range tree introduction removed the need for maple tree usage
but missed removing the MT_ENTRY defined value that was used to
mark maple tree allocated entries.

Remove the MT_ENTRY define.

Fixes: b795379757eb ("bpf: Introduce range_tree data structure and use it in bpf arena")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
---

Found it while looking at range tree code to possibly reuse it for
another project.

 kernel/bpf/arena.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/arena.c b/kernel/bpf/arena.c
index 945a5680f6a5..f5f6b00a982e 100644
--- a/kernel/bpf/arena.c
+++ b/kernel/bpf/arena.c
@@ -257,8 +257,6 @@ static void arena_vm_close(struct vm_area_struct *vma)
 	kfree(vml);
 }
 
-#define MT_ENTRY ((void *)&arena_map_ops) /* unused. has to be valid pointer */
-
 static vm_fault_t arena_vm_fault(struct vm_fault *vmf)
 {
 	struct bpf_map *map = vmf->vma->vm_file->private_data;
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: Remove unused MT_ENTRY define
  2024-12-23 11:59 [PATCH] bpf: Remove unused MT_ENTRY define Lorenzo Pieralisi
@ 2024-12-30 23:19 ` Alexei Starovoitov
  2024-12-30 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2024-12-30 23:19 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: bpf, LKML, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Mon, Dec 23, 2024 at 3:59 AM Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
>
> The range tree introduction removed the need for maple tree usage
> but missed removing the MT_ENTRY defined value that was used to
> mark maple tree allocated entries.
>
> Remove the MT_ENTRY define.
>
> Fixes: b795379757eb ("bpf: Introduce range_tree data structure and use it in bpf arena")

Fixes tag is not necessary for this kind of cleanup.
I removed it while applying.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: Remove unused MT_ENTRY define
  2024-12-23 11:59 [PATCH] bpf: Remove unused MT_ENTRY define Lorenzo Pieralisi
  2024-12-30 23:19 ` Alexei Starovoitov
@ 2024-12-30 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-30 23:20 UTC (permalink / raw)
  To: Lorenzo Pieralisi; +Cc: bpf, linux-kernel, andrii, ast, daniel

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Mon, 23 Dec 2024 12:59:01 +0100 you wrote:
> The range tree introduction removed the need for maple tree usage
> but missed removing the MT_ENTRY defined value that was used to
> mark maple tree allocated entries.
> 
> Remove the MT_ENTRY define.
> 
> Fixes: b795379757eb ("bpf: Introduce range_tree data structure and use it in bpf arena")
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Andrii Nakryiko <andrii@kernel.org>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> 
> [...]

Here is the summary with links:
  - bpf: Remove unused MT_ENTRY define
    https://git.kernel.org/bpf/bpf-next/c/654a3381e3b4

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:[~2024-12-30 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-23 11:59 [PATCH] bpf: Remove unused MT_ENTRY define Lorenzo Pieralisi
2024-12-30 23:19 ` Alexei Starovoitov
2024-12-30 23: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