Skip to content

Commit a6dda77

Browse files
Yang Jihongnamhyung
authored andcommitted
perf kwork: Fix a build error on 32-bit
lkft reported a build error for 32-bit system: builtin-kwork.c: In function 'top_print_work': builtin-kwork.c:1646:28: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] 1646 | ret += printf(" %*ld ", PRINT_PID_WIDTH, work->id); | ~~~^ ~~~~~~~~ | | | | long int u64 {aka long long unsigned int} | %*lld cc1: all warnings being treated as errors make[3]: *** [/builds/linux/tools/build/Makefile.build:106: /home/tuxbuild/.cache/tuxmake/builds/1/build/builtin-kwork.o] Error 1 Fix it. Fixes: 55c40e5 ("perf kwork top: Introduce new top utility") Reported-by: Linux Kernel Functional Testing <[email protected]> Signed-off-by: Yang Jihong <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 98b1cc8 commit a6dda77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-kwork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ static int top_print_work(struct perf_kwork *kwork __maybe_unused, struct kwork_
16431643
/*
16441644
* pid
16451645
*/
1646-
ret += printf(" %*ld ", PRINT_PID_WIDTH, work->id);
1646+
ret += printf(" %*" PRIu64 " ", PRINT_PID_WIDTH, work->id);
16471647

16481648
/*
16491649
* tgid

0 commit comments

Comments
 (0)