btf_encoder: Use encoder->verbose instead of btf_encoder__verbose

Its available, has the same value, use the per-instance 'verbose' member
instead of the global, this should be the last use of that global, time
to ditch it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-06-09 10:39:05 -03:00
parent 4ffa484b6a
commit 1bf2e3511a
1 changed files with 2 additions and 2 deletions

View File

@ -438,7 +438,7 @@ int btf_encoder__add_enum_val(struct btf_encoder *encoder, const char *name, int
int err = btf__add_enum_value(encoder->btf, name, value);
if (!err) {
if (btf_encoder__verbose)
if (encoder->verbose)
printf("\t%s val=%d\n", name, value);
} else {
fprintf(stderr, "\t%s val=%d Error emitting BTF enum value\n",
@ -564,7 +564,7 @@ int32_t btf_encoder__add_datasec(struct btf_encoder *encoder, const char *sectio
vsi = (struct btf_var_secinfo *)var_secinfo_buf->entries + i;
err = btf__add_datasec_var_info(btf, vsi->type, vsi->offset, vsi->size);
if (!err) {
if (btf_encoder__verbose)
if (encoder->verbose)
printf("\ttype=%u offset=%u size=%u\n",
vsi->type, vsi->offset, vsi->size);
} else {