* [PATCH v1] perf genelf: Fix NO_LIBDW=1 build
@ 2025-07-02 17:54 Ian Rogers
2025-07-02 19:17 ` Namhyung Kim
2025-07-03 18:16 ` Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Ian Rogers @ 2025-07-02 17:54 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Kan Liang, Yuzhuo Jing,
linux-perf-users, linux-kernel
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>
---
tools/perf/util/genelf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c
index fcf86a27f69e..591548b10e34 100644
--- a/tools/perf/util/genelf.c
+++ b/tools/perf/util/genelf.c
@@ -160,7 +160,7 @@ jit_add_eh_frame_info(Elf *e, void* unwinding, uint64_t unwinding_header_size,
* csize: the code size in bytes
*/
int
-jit_write_elf(int fd, uint64_t load_addr, const char *sym,
+jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
const void *code, int csize,
void *debug __maybe_unused, int nr_debug_entries __maybe_unused,
void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_size)
--
2.50.0.727.gbf7dc18ff4-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] perf genelf: Fix NO_LIBDW=1 build
2025-07-02 17:54 [PATCH v1] perf genelf: Fix NO_LIBDW=1 build Ian Rogers
@ 2025-07-02 19:17 ` Namhyung Kim
2025-07-03 18:16 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2025-07-02 19:17 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
Kan Liang, Yuzhuo Jing, linux-perf-users, linux-kernel
On Wed, Jul 02, 2025 at 10:54:02AM -0700, Ian Rogers wrote:
> 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,
> ```
Thanks for the fix.
And I found there's no entry for NO_LIBDW=1 in the build-test.
Can you please add one?
Thanks,
Namhyung
>
> Fixes: e3f612c1d8f3 ("perf genelf: Remove libcrypto dependency and use built-in sha1()")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/util/genelf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c
> index fcf86a27f69e..591548b10e34 100644
> --- a/tools/perf/util/genelf.c
> +++ b/tools/perf/util/genelf.c
> @@ -160,7 +160,7 @@ jit_add_eh_frame_info(Elf *e, void* unwinding, uint64_t unwinding_header_size,
> * csize: the code size in bytes
> */
> int
> -jit_write_elf(int fd, uint64_t load_addr, const char *sym,
> +jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
> const void *code, int csize,
> void *debug __maybe_unused, int nr_debug_entries __maybe_unused,
> void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_size)
> --
> 2.50.0.727.gbf7dc18ff4-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] perf genelf: Fix NO_LIBDW=1 build
2025-07-02 17:54 [PATCH v1] perf genelf: Fix NO_LIBDW=1 build Ian Rogers
2025-07-02 19:17 ` Namhyung Kim
@ 2025-07-03 18:16 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2025-07-03 18:16 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
Kan Liang, Yuzhuo Jing, linux-perf-users, linux-kernel,
Ian Rogers
On Wed, 02 Jul 2025 10:54:02 -0700, Ian Rogers wrote:
> 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,
> ```
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-03 18:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 17:54 [PATCH v1] perf genelf: Fix NO_LIBDW=1 build Ian Rogers
2025-07-02 19:17 ` Namhyung Kim
2025-07-03 18:16 ` Namhyung Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.