[Public]
Reviewed-by: Guchun Chen
Hi @Lijo Lazar,
Can you pls submit your patch to drm-next soon? This indeed fixs the regession
by rlc indiect reg access related patches.
Regards,
Guchun
-Original Message-
From: amd-gfx On Behalf Of Lijo Lazar
Sent: Friday, January 28, 2022 2:40 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander ; kernel test robot
; Zhang, Hawking
Subject: [PATCH] drm/amdgpu: Fix uninitialized variable use warning
Fix uninitialized variable use
warning: variable 'reg_access_ctrl' is uninitialized when used here
[-Wuninitialized]
scratch_reg0 = (void __iomem *)adev->rmmio + 4 *
reg_access_ctrl->scratch_reg0;
Fixes: 51263163eb3f("drm/amdgpu: add helper for rlcg indirect reg
access")
Reported-by: kernel test robot
Signed-off-by: Lijo Lazar
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 80c25176c993..c13765218919 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -875,6 +875,7 @@ static u32 amdgpu_virt_rlcg_reg_rw(struct amdgpu_device
*adev, u32 offset, u32 v
return 0;
}
+ reg_access_ctrl = &adev->gfx.rlc.reg_access_ctrl;
scratch_reg0 = (void __iomem *)adev->rmmio + 4 *
reg_access_ctrl->scratch_reg0;
scratch_reg1 = (void __iomem *)adev->rmmio + 4 *
reg_access_ctrl->scratch_reg1;
scratch_reg2 = (void __iomem *)adev->rmmio + 4 *
reg_access_ctrl->scratch_reg2;
--
2.25.1