Linux Perf Users
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 7/7] btf_encoder: Remove unused variables
Date: Thu, 18 Jun 2026 12:16:06 -0300	[thread overview]
Message-ID: <20260618151606.82747-8-acme@kernel.org> (raw)
In-Reply-To: <20260618151606.82747-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Detected with gcc on fedora44:

  /home/acme/git/pahole/btf_encoder.c: In function ‘types__match’:
  /home/acme/git/pahole/btf_encoder.c:1123:49: warning: variable ‘p2’ set but not used [-Wunused-but-set-variable=]
   1123 |                         const struct btf_param *p2 = btf_params(t2);
        |                                                 ^~
  /home/acme/git/pahole/btf_encoder.c:1122:49: warning: variable ‘p1’ set but not used [-Wunused-but-set-variable=]
   1122 |                         const struct btf_param *p1 = btf_params(t1);
        |                                                 ^~

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 btf_encoder.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/btf_encoder.c b/btf_encoder.c
index 12c22b003b7990bf..4467710e4e03c32f 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -1119,8 +1119,6 @@ static bool types__match(struct btf_encoder *encoder,
 			break;
 		}
 		case BTF_KIND_FUNC_PROTO: {
-			const struct btf_param *p1 = btf_params(t1);
-			const struct btf_param *p2 = btf_params(t2);
 			int i, vlen = btf_vlen(t1);
 
 			if (vlen != btf_vlen(t2))
@@ -1128,7 +1126,7 @@ static bool types__match(struct btf_encoder *encoder,
 			if (!types__match(encoder, btf1, t1->type,
 					  btf2, t2->type))
 				return false;
-			for (i = 0; i < vlen; i++, p1++, p2++) {
+			for (i = 0; i < vlen; i++) {
 				if (!types__match(encoder, btf1, t1->type,
 						  btf2, t2->type))
 					return false;
-- 
2.54.0


  parent reply	other threads:[~2026-06-18 15:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 15:15 [PATCHES v2 0/7] Initial support for some Rust tags + way to ask for CU merging at load time Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 1/7] dwarf_loader: Initial support for DW_TAG_variant_part Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 2/7] dwarf_loader: Allow forcing the merge of CUs for solving inter CU tag references Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 3/7] dwarf_loader: Initial support for DW_TAG_subprogram in DW_TAG_enumeration Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 4/7] encoders: Fix diagnostic messages for unexpected tags in enumerations Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 5/7] dwarves_fprintf: Accumulate function__fprintf return value in enumeration printing Arnaldo Carvalho de Melo
2026-06-18 15:16 ` [PATCH 6/7] dwarves: Use tag__delete for enumeration children Arnaldo Carvalho de Melo
2026-06-18 15:16 ` Arnaldo Carvalho de Melo [this message]
2026-06-18 17:31 ` [PATCHES v2 0/7] Initial support for some Rust tags + way to ask for CU merging at load time Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260618151606.82747-8-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox