From dc30e82b26dc98ef47fe727acbc4033dfb0dcae2 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 5 Aug 2021 16:16:30 -0300 Subject: [PATCH] btf_encoder: btf_encoder__encode_tag() doesn't need the 'cu' pointer Since we don't need the cu to get the strings table anymore, all tags have a char pointer for strings. Signed-off-by: Arnaldo Carvalho de Melo --- btf_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btf_encoder.c b/btf_encoder.c index 3eed465..fe642a2 100644 --- a/btf_encoder.c +++ b/btf_encoder.c @@ -817,7 +817,7 @@ static int32_t btf_encoder__add_enum_type(struct btf_encoder *encoder, struct ta return type_id; } -static int btf_encoder__encode_tag(struct btf_encoder *encoder, struct cu *cu, struct tag *tag, +static int btf_encoder__encode_tag(struct btf_encoder *encoder, struct tag *tag, uint32_t core_id, uint32_t type_id_off) { /* single out type 0 as it represents special type "void" */ @@ -1381,7 +1381,7 @@ int btf_encoder__encode_cu(struct btf_encoder *encoder, struct cu *cu) } cu__for_each_type(cu, core_id, pos) { - int32_t btf_type_id = btf_encoder__encode_tag(encoder, cu, pos, core_id, type_id_off); + int32_t btf_type_id = btf_encoder__encode_tag(encoder, pos, core_id, type_id_off); if (btf_type_id < 0 || tag__check_id_drift(pos, core_id, btf_type_id, type_id_off)) {