linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: kajoljain <kjain@linux.ibm.com>
To: Haowen Bai <baihaowen@meizu.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Shuah Khan <shuah@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/powerpc/pmu: Fix unsigned function returning negative constant
Date: Tue, 26 Apr 2022 12:00:36 +0530	[thread overview]
Message-ID: <0e4b0f8e-6c45-8d14-303f-2168f5004a12@linux.ibm.com> (raw)
In-Reply-To: <1650788802-14402-1-git-send-email-baihaowen@meizu.com>



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@meizu.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@linux.ibm.com>

Thanks,
Kajol Jain


>  	if (!strcmp(register_name, "R0"))
>  		return 0;

  reply	other threads:[~2022-04-26  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  8:26 [PATCH] selftests/powerpc/pmu: Fix unsigned function returning negative constant Haowen Bai
2022-04-26  6:30 ` kajoljain [this message]
2022-04-26  6:46   ` [PATCH V2] " Haowen Bai
2022-05-15 10:12 ` [PATCH] " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e4b0f8e-6c45-8d14-303f-2168f5004a12@linux.ibm.com \
    --to=kjain@linux.ibm.com \
    --cc=baihaowen@meizu.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).