Skip to contentSkip to conversation

bpf: Remove unused MT_ENTRY define

PATCH Applied Lorenzo Pieralisi 3 participants 3 messages Dec 23, 2024 – Dec 30, 2024 BPF

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: Remove unused MT_ENTRY define

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")
Cc Andrii Nakryiko <[email protected]>
Cc Alexei Starovoitov <[email protected]>
Cc Daniel Borkmann <[email protected]>

---

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(-)
kernel/bpf/arena.c +0 -2
index 945a5680f6a5..f5f6b00a982e 100644
@@ -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;
Signature · 1 line
2.47.0
#1 lore raw
Quoted 8 lines · Lorenzo Pieralisi

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.

#2 lore raw
In reply to Lorenzo Pieralisi
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Quoted 6 lines · 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.

Quoted 7 lines
Fixes b795379757eb ("bpf: Introduce range_tree data structure and use it in bpf arena")
Cc Andrii Nakryiko <[email protected]>
Cc Alexei Starovoitov <[email protected]>
Cc Daniel Borkmann <[email protected]>

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html