Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH] perf: Fix up build failure due to bpf changes
@ 2026-06-17 12:45 Mark Brown
  2026-06-17 12:53 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-06-17 12:45 UTC (permalink / raw)
  To: Linus Torvalds, Arnaldo Carvalho de Melo, Alan Maguire,
	Alexei Starovoitov
  Cc: linux-perf-users, bpf, Mark Brown

Fix

util/btf.c: In function '__btf_type__find_member_by_name':
util/btf.c:19:43: error: comparison of integer expressions of different signedness: 'int' and '__u32' {aka 'unsigned int'} [-Werror=sign-compare]
   19 |         for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
      |                                           ^
cc1: all warnings being treated as errors

by making the variable the same type as the function.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/perf/util/btf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/btf.c b/tools/perf/util/btf.c
index bb163fe87767c..50d98f3e83bf0 100644
--- a/tools/perf/util/btf.c
+++ b/tools/perf/util/btf.c
@@ -14,7 +14,7 @@ const struct btf_member *__btf_type__find_member_by_name(struct btf *btf,
 {
 	const struct btf_type *t = btf__type_by_id(btf, type_id);
 	const struct btf_member *m;
-	int i;
+	u32 i;
 
 	for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
 		const char *current_member_name = btf__name_by_offset(btf, m->name_off);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf: Fix up build failure due to bpf changes
  2026-06-17 12:45 [PATCH] perf: Fix up build failure due to bpf changes Mark Brown
@ 2026-06-17 12:53 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-06-17 12:53 UTC (permalink / raw)
  To: Linus Torvalds, Arnaldo Carvalho de Melo, Alan Maguire,
	Alexei Starovoitov
  Cc: linux-perf-users, bpf

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

On Wed, Jun 17, 2026 at 01:45:54PM +0100, Mark Brown wrote:
> Fix
> 
> util/btf.c: In function '__btf_type__find_member_by_name':
> util/btf.c:19:43: error: comparison of integer expressions of different signedness: 'int' and '__u32' {aka 'unsigned int'} [-Werror=sign-compare]
>    19 |         for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
>       |                                           ^

Gah, there's another one which I will also fix up - I'll send a v2 in a
minute.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-17 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 12:45 [PATCH] perf: Fix up build failure due to bpf changes Mark Brown
2026-06-17 12:53 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox