[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e4b0f8e-6c45-8d14-303f-2168f5004a12@linux.ibm.com>
Date: Tue, 26 Apr 2022 12:00:36 +0530
From: kajoljain <kjain@...ux.ibm.com>
To: Haowen Bai <baihaowen@...zu.com>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Shuah Khan <shuah@...nel.org>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/powerpc/pmu: Fix unsigned function returning
negative constant
On 4/24/22 13:56, Haowen Bai wrote:
> 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@...zu.com>
> ---
> tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)
> {
Hi Haowen,
Thanks for correcting it. Can you also add fix tag with corresponding
commit id details.
Other than that patch looks good to me.
Reviewed-by: Kajol Jain<kjain@...ux.ibm.com>
Thanks,
Kajol Jain
> if (!strcmp(register_name, "R0"))
> return 0;
Powered by blists - more mailing lists