drm/amdgpu: correct return type of amdgpu_ras_query_error_count
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Quoted 70 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Guchun Chen
Sent: 2019年8月16日 15:10
To: [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Pan, Xinhui <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: correct return type ofamdgpu_ras_query_error_countThe return value type of
amdgpu_ras_query_error_countshould be unsigned long, not int.Change-Id I011406d81bad69a65433b63960e1691c4959bbc5Signed-off-by Guchun Chen <[email protected]>--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1
-0@@ -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,drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-2struct 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;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0data.ue_count += info.ue_count;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +0
-0@@ -484,7 +484,7 @@ int amdgpu_ras_request_reset_on_boot(struct
amdgpu_device*adev, voidamdgpu_ras_resume(struct amdgpu_device *adev); voidamdgpu_ras_suspend(struct amdgpu_device *adev);drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +1
-1-int amdgpu_ras_query_error_count(struct amdgpu_device *adev, +unsigned long amdgpu_ras_query_error_count(struct amdgpu_device*adev,
boolis_ce);
Quoted 8 lines
/* error handling functions */
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB30540425780469918EB12945B0AF0-rweVpJHSKTqnT25eLM+iUQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
In ras unit test tool, we have already used "unsigned long" to record the ce and ue error count.
Regards,
Guchun
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, August 16, 2019 5:59 PM
To: Chen, Guchun <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Pan, Xinhui <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count
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
Quoted 70 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Guchun Chen
Sent: 2019年8月16日 15:10
To: [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Pan, Xinhui <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: correct return type ofamdgpu_ras_query_error_countThe return value type of
amdgpu_ras_query_error_countshould be unsigned long, not int.Change-Id I011406d81bad69a65433b63960e1691c4959bbc5Signed-off-by Guchun Chen <[email protected]>--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1
-0@@ -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,drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-2struct 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;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0data.ue_count += info.ue_count;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +0
-0@@ -484,7 +484,7 @@ int amdgpu_ras_request_reset_on_boot(struct
amdgpu_device*adev, voidamdgpu_ras_resume(struct amdgpu_device *adev); voidamdgpu_ras_suspend(struct amdgpu_device *adev);drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +1
-1-int amdgpu_ras_query_error_count(struct amdgpu_device *adev, +unsigned long amdgpu_ras_query_error_count(struct amdgpu_device*adev,
boolis_ce);
Quoted 8 lines
/* error handling functions */
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx