diff mbox series

[bpf-next] libbpf: remove unused variable

Message ID 20210820165511.72890-1-mauricio@kinvolk.io (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series [bpf-next] libbpf: remove unused variable | expand

Checks

Context Check Description
netdev/apply fail Patch does not apply to bpf-next
netdev/tree_selection success Clearly marked for bpf-next
bpf/vmtest pending VM_Test

Commit Message

Mauricio Vásquez Aug. 20, 2021, 4:55 p.m. UTC
From: Mauricio Vásquez <mauriciov@microsoft.com>

Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm")

Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
---
 tools/lib/bpf/relo_core.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Mauricio Vásquez Aug. 20, 2021, 6:06 p.m. UTC | #1
On Fri, Aug 20, 2021 at 11:55 AM Mauricio Vásquez <mauricio@kinvolk.io> wrote:
>
> From: Mauricio Vásquez <mauriciov@microsoft.com>
>
> Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm")
>
> Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
> ---
>  tools/lib/bpf/relo_core.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git tools/lib/bpf/relo_core.c tools/lib/bpf/relo_core.c
> index 4016ed492d0c..52d8125b7cbe 100644
> --- tools/lib/bpf/relo_core.c
> +++ tools/lib/bpf/relo_core.c
> @@ -417,13 +417,6 @@ static int bpf_core_match_member(const struct btf *local_btf,
>                                 return found;
>                 } else if (strcmp(local_name, targ_name) == 0) {
>                         /* matching named field */
> -                       struct bpf_core_accessor *targ_acc;
> -
> -                       targ_acc = &spec->spec[spec->len++];
> -                       targ_acc->type_id = targ_id;
> -                       targ_acc->idx = i;
> -                       targ_acc->name = targ_name;
> -
>                         *next_targ_id = m->type;
>                         found = bpf_core_fields_are_compat(local_btf,
>                                                            local_member->type,
> --
> 2.25.1
>

Forget that, it's used indeed. Sorry for the noise.
diff mbox series

Patch

diff --git tools/lib/bpf/relo_core.c tools/lib/bpf/relo_core.c
index 4016ed492d0c..52d8125b7cbe 100644
--- tools/lib/bpf/relo_core.c
+++ tools/lib/bpf/relo_core.c
@@ -417,13 +417,6 @@  static int bpf_core_match_member(const struct btf *local_btf,
 				return found;
 		} else if (strcmp(local_name, targ_name) == 0) {
 			/* matching named field */
-			struct bpf_core_accessor *targ_acc;
-
-			targ_acc = &spec->spec[spec->len++];
-			targ_acc->type_id = targ_id;
-			targ_acc->idx = i;
-			targ_acc->name = targ_name;
-
 			*next_targ_id = m->type;
 			found = bpf_core_fields_are_compat(local_btf,
 							   local_member->type,