diff options
author | Haowen Bai <baihaowen@meizu.com> | 2022-04-24 10:26:41 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-04-26 05:17:00 +0200 |
commit | a84ca704d8306a949578d36c028c8e1bab3dcf0b (patch) | |
tree | 0a7f9912eccf4497473aef774354a993bd447287 /tools | |
parent | powerpc/boot: remove unused function find_node_by_linuxphandle() (diff) | |
download | linux-a84ca704d8306a949578d36c028c8e1bab3dcf0b.tar.xz linux-a84ca704d8306a949578d36c028c8e1bab3dcf0b.zip |
selftests/powerpc/pmu: Fix unsigned function returning negative constant
The function __perf_reg_mask has an unsigned return type, but returns a
negative constant to indicate an error condition. So we change unsigned
to int.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1650788802-14402-1-git-send-email-baihaowen@meizu.com
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c index fca054bbc094..c01a31d5f4ee 100644 --- a/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c +++ b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c @@ -274,7 +274,7 @@ u64 *get_intr_regs(struct event *event, void *sample_buff) return intr_regs; } -static const unsigned int __perf_reg_mask(const char *register_name) +static const int __perf_reg_mask(const char *register_name) { if (!strcmp(register_name, "R0")) return 0; |