Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf genelf: Fix NO_LIBDW=1 build

With NO_LIBDW=1 a new unused-parameter warning/error has appeared:
```
util/genelf.c: In function ‘jit_write_elf’:
util/genelf.c:163:32: error: unused parameter ‘load_addr’ [-Werror=unused-parameter]
163 | jit_write_elf(int fd, uint64_t load_addr, const char *sym,
```

Fixes: e3f612c1d8f3 ("perf genelf: Remove libcrypto dependency and use built-in sha1()")
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250702175402.761818-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
d4ae1620 508b2289

+1 -1
+1 -1
tools/perf/util/genelf.c
··· 160 160 * csize: the code size in bytes 161 161 */ 162 162 int 163 - jit_write_elf(int fd, uint64_t load_addr, const char *sym, 163 + jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym, 164 164 const void *code, int csize, 165 165 void *debug __maybe_unused, int nr_debug_entries __maybe_unused, 166 166 void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_size)