Commit 900cc363 authored by YueHaibing's avatar YueHaibing Committed by Alex Deucher

drm/amdgpu: remove set but not used variable 'ring'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/psp_v10_0.c: In function 'psp_v10_0_ring_stop':
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c:230:19: warning:
 variable 'ring' set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/amd/amdgpu/psp_v3_1.c: In function 'psp_v3_1_ring_stop':
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:359:19: warning:
 variable ‘ring’ set but not used [-Wunused-but-set-variable]

It not used since commit
4ef72453 ("drm/amdgpu: added api for stopping psp ring (v2)")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bed1ed36
...@@ -240,12 +240,9 @@ static int psp_v10_0_ring_stop(struct psp_context *psp, ...@@ -240,12 +240,9 @@ static int psp_v10_0_ring_stop(struct psp_context *psp,
enum psp_ring_type ring_type) enum psp_ring_type ring_type)
{ {
int ret = 0; int ret = 0;
struct psp_ring *ring;
unsigned int psp_ring_reg = 0; unsigned int psp_ring_reg = 0;
struct amdgpu_device *adev = psp->adev; struct amdgpu_device *adev = psp->adev;
ring = &psp->km_ring;
/* Write the ring destroy command to C2PMSG_64 */ /* Write the ring destroy command to C2PMSG_64 */
psp_ring_reg = 3 << 16; psp_ring_reg = 3 << 16;
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg); WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg);
......
...@@ -356,12 +356,9 @@ static int psp_v3_1_ring_stop(struct psp_context *psp, ...@@ -356,12 +356,9 @@ static int psp_v3_1_ring_stop(struct psp_context *psp,
enum psp_ring_type ring_type) enum psp_ring_type ring_type)
{ {
int ret = 0; int ret = 0;
struct psp_ring *ring;
unsigned int psp_ring_reg = 0; unsigned int psp_ring_reg = 0;
struct amdgpu_device *adev = psp->adev; struct amdgpu_device *adev = psp->adev;
ring = &psp->km_ring;
/* Write the ring destroy command to C2PMSG_64 */ /* Write the ring destroy command to C2PMSG_64 */
psp_ring_reg = 3 << 16; psp_ring_reg = 3 << 16;
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg); WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment