All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhou1, Tao" <Tao.Zhou1-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Zhang, Hawking" <Hawking.Zhang-5C7GfCeVMHo@public.gmane.org>,
	"Li, Dennis" <Dennis.Li-5C7GfCeVMHo@public.gmane.org>,
	"Pan, Xinhui" <Xinhui.Pan-5C7GfCeVMHo@public.gmane.org>
Cc: "Chen, Guchun" <Guchun.Chen-5C7GfCeVMHo@public.gmane.org>
Subject: RE: [PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count
Date: Fri, 16 Aug 2019 09:59:00 +0000	[thread overview]
Message-ID: <MN2PR12MB30540425780469918EB12945B0AF0@MN2PR12MB3054.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20190816071013.21034-1-guchun.chen-5C7GfCeVMHo@public.gmane.org>

The change is reasonable, but I also check the function's caller, a uint32_t ras_counter stores the value in amdgpu_ctx_query2.
How about ras test tool? Can we get rid of all the chaos about the counter's type?

Tao

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
> Guchun Chen
> Sent: 2019年8月16日 15:10
> To: amd-gfx@lists.freedesktop.org; Zhang, Hawking
> <Hawking.Zhang@amd.com>; Li, Dennis <Dennis.Li@amd.com>; Pan, Xinhui
> <Xinhui.Pan@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>
> Cc: Chen, Guchun <Guchun.Chen@amd.com>
> Subject: [PATCH] drm/amdgpu: correct return type of
> amdgpu_ras_query_error_count
> 
> The return value type of amdgpu_ras_query_error_count should be
> unsigned long, not int.
> 
> Change-Id: I011406d81bad69a65433b63960e1691c4959bbc5
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 50c13b02d234..df4b9ae39c5e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -686,7 +686,7 @@ int amdgpu_ras_error_cure(struct amdgpu_device
> *adev,  }
> 
>  /* get the total error counts on all IPs */ -int
> amdgpu_ras_query_error_count(struct amdgpu_device *adev,
> +unsigned long amdgpu_ras_query_error_count(struct amdgpu_device
> *adev,
>  		bool is_ce)
>  {
>  	struct amdgpu_ras *con = amdgpu_ras_get_context(adev); @@ -
> 694,7 +694,7 @@ int amdgpu_ras_query_error_count(struct amdgpu_device
> *adev,
>  	struct ras_err_data data = {0, 0};
> 
>  	if (!con)
> -		return -EINVAL;
> +		return 0;
> 
>  	list_for_each_entry(obj, &con->head, node) {
>  		struct ras_query_if info = {
> @@ -702,7 +702,7 @@ int amdgpu_ras_query_error_count(struct
> amdgpu_device *adev,
>  		};
> 
>  		if (amdgpu_ras_error_query(adev, &info))
> -			return -EINVAL;
> +			return 0;
> 
>  		data.ce_count += info.ce_count;
>  		data.ue_count += info.ue_count;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> index 2765f2dbb1e6..02a51e3dfa14 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> @@ -484,7 +484,7 @@ int amdgpu_ras_request_reset_on_boot(struct
> amdgpu_device *adev,  void amdgpu_ras_resume(struct amdgpu_device
> *adev);  void amdgpu_ras_suspend(struct amdgpu_device *adev);
> 
> -int amdgpu_ras_query_error_count(struct amdgpu_device *adev,
> +unsigned long amdgpu_ras_query_error_count(struct amdgpu_device
> *adev,
>  		bool is_ce);
> 
>  /* error handling functions */
> --
> 2.17.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

       reply	other threads:[~2019-08-16  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190816071013.21034-1-guchun.chen@amd.com>
     [not found] ` <20190816071013.21034-1-guchun.chen-5C7GfCeVMHo@public.gmane.org>
2019-08-16  9:59   ` Zhou1, Tao [this message]
     [not found]     ` <MN2PR12MB30540425780469918EB12945B0AF0-rweVpJHSKTqnT25eLM+iUQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-08-16 10:20       ` [PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count Chen, Guchun

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=MN2PR12MB30540425780469918EB12945B0AF0@MN2PR12MB3054.namprd12.prod.outlook.com \
    --to=tao.zhou1-5c7gfcevmho@public.gmane.org \
    --cc=Dennis.Li-5C7GfCeVMHo@public.gmane.org \
    --cc=Guchun.Chen-5C7GfCeVMHo@public.gmane.org \
    --cc=Hawking.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=Xinhui.Pan-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 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.