Skip to contentSkip to conversation

libbpf: change var type in datasec resize func

PATCH Applied JP Kobryn 3 participants 3 messages May 25, 2023

Subsystems (2)
lore
Share & tools
lore

JP Kobryn

author
#0 lore raw

PATCH 1/1 libbpf: change var type in datasec resize func

This changes a local variable type that stores a new array id to match the return type of btf__add_array().

---
 tools/lib/bpf/libbpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/bpf/libbpf.c +2 -2
index 5cca00979aae..1ceb3a97dadc 100644
@@ -9444,8 +9444,8 @@ static int map_btf_datasec_resize(struct bpf_map *map, __u32 size)
 	struct btf_var_secinfo *var;
 	const struct btf_type *array_type;
 	const struct btf_array *array;
-	int vlen, element_sz;
-	__u32 nr_elements, new_array_id;
+	int vlen, element_sz, new_array_id;
+	__u32 nr_elements;
 
 	/* check btf existence */
 	btf = bpf_object__btf(map->obj);
Signature · 1 line
2.40.0
#2 lore raw
In reply to JP Kobryn
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Hello:

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

Quoted 7 lines · On Wed, 24 May 2023 17:13:23 -0700 you wrote:

This changes a local variable type that stores a new array id to match the return type of btf__add_array().

---
 tools/lib/bpf/libbpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [bpf-next] libbpf: change var type in datasec resize func

    https://git.kernel.org/bpf/bpf-next/c/4c857a719bf9

You are awesome, thank you!

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