* [PATCH] drm/amdgpu/gfx10: fix mixed declaration and code warning
@ 2021-07-21 3:14 Alex Deucher
2021-07-21 6:37 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2021-07-21 3:14 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Roy Sun
Move the declaration up to the top of the function.
Fixes: 631d55e089eaa8 ("drm/amdgpu: Add error message when programing registers fails")
Cc: Roy Sun <Roy.Sun@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index ca06fb137cac..d102cfd36ba2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1493,6 +1493,7 @@ static u32 gfx_v10_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint32
uint32_t i = 0;
uint32_t retries = 50000;
u32 ret = 0;
+ u32 tmp;
scratch_reg0 = adev->rmmio +
(adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG0) * 4;
@@ -1526,7 +1527,6 @@ static u32 gfx_v10_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint32
writel(v, scratch_reg0);
writel(offset | flag, scratch_reg1);
writel(1, spare_int);
- u32 tmp;
for (i = 0; i < retries; i++) {
tmp = readl(scratch_reg1);
--
2.31.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: fix mixed declaration and code warning
2021-07-21 3:14 [PATCH] drm/amdgpu/gfx10: fix mixed declaration and code warning Alex Deucher
@ 2021-07-21 6:37 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2021-07-21 6:37 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: Roy Sun
Am 21.07.21 um 05:14 schrieb Alex Deucher:
> Move the declaration up to the top of the function.
>
> Fixes: 631d55e089eaa8 ("drm/amdgpu: Add error message when programing registers fails")
> Cc: Roy Sun <Roy.Sun@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index ca06fb137cac..d102cfd36ba2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -1493,6 +1493,7 @@ static u32 gfx_v10_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint32
> uint32_t i = 0;
> uint32_t retries = 50000;
> u32 ret = 0;
> + u32 tmp;
>
> scratch_reg0 = adev->rmmio +
> (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG0) * 4;
> @@ -1526,7 +1527,6 @@ static u32 gfx_v10_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint32
> writel(v, scratch_reg0);
> writel(offset | flag, scratch_reg1);
> writel(1, spare_int);
> - u32 tmp;
>
> for (i = 0; i < retries; i++) {
> tmp = readl(scratch_reg1);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 3:14 [PATCH] drm/amdgpu/gfx10: fix mixed declaration and code warning Alex Deucher
2021-07-21 6:37 ` Christian König
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.