Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: remove set but not used variable 'mc_shared_chmap' from 'gfx_v6_0.c' and 'gfx_v7_0.c'

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

drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c: In function
‘gfx_v6_0_constants_init’:
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:1579:6: warning: variable
‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c: In function
‘gfx_v7_0_gpu_early_init’:
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4262:6: warning: variable
‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable]

Fixes: 2cd46ad22383 ("drm/amdgpu: add graphic pipeline implementation for si v8")
Fixes: d93f3ca706b8 ("drm/amdgpu/gfx7: rework gpu_init()")
Signed-off-by: yu kuai <yukuai3@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

yu kuai and committed by
Alex Deucher
747a397d 025916c9

+2 -4
+1 -2
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
··· 1576 1576 static void gfx_v6_0_constants_init(struct amdgpu_device *adev) 1577 1577 { 1578 1578 u32 gb_addr_config = 0; 1579 - u32 mc_shared_chmap, mc_arb_ramcfg; 1579 + u32 mc_arb_ramcfg; 1580 1580 u32 sx_debug_1; 1581 1581 u32 hdp_host_path_cntl; 1582 1582 u32 tmp; ··· 1678 1678 1679 1679 WREG32(mmBIF_FB_EN, BIF_FB_EN__FB_READ_EN_MASK | BIF_FB_EN__FB_WRITE_EN_MASK); 1680 1680 1681 - mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP); 1682 1681 adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG); 1683 1682 mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg; 1684 1683
+1 -2
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
··· 4258 4258 static void gfx_v7_0_gpu_early_init(struct amdgpu_device *adev) 4259 4259 { 4260 4260 u32 gb_addr_config; 4261 - u32 mc_shared_chmap, mc_arb_ramcfg; 4261 + u32 mc_arb_ramcfg; 4262 4262 u32 dimm00_addr_map, dimm01_addr_map, dimm10_addr_map, dimm11_addr_map; 4263 4263 u32 tmp; 4264 4264 ··· 4335 4335 break; 4336 4336 } 4337 4337 4338 - mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP); 4339 4338 adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG); 4340 4339 mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg; 4341 4340