[PATCH 1/1] drm/amdgpu/gmc7: remove dead code
Joe Perches
joe at perches.com
Sun Aug 21 18:29:11 UTC 2016
On Sun, 2016-08-21 at 20:06 +0200, Heinrich Schuchardt wrote:
> In an if block for (running == 0) running cannot be non-zero.
This code could also be better unindented by one level
(all of the block would fit 80 columns) by changing:
if (running == 0) {
[code...]
}
return 0;
to:
if (running)
return 0;
[code...]
return 0;
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
[]
> @@ -203,11 +203,6 @@ static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev)
> running = REG_GET_FIELD(RREG32(mmMC_SEQ_SUP_CNTL), MC_SEQ_SUP_CNTL, RUN);
>
> if (running == 0) {
> - if (running) {
> - blackout = RREG32(mmMC_SHARED_BLACKOUT_CNTL);
> - WREG32(mmMC_SHARED_BLACKOUT_CNTL, blackout | 1);
> - }
> -
> /* reset the engine and set to writable */
> WREG32(mmMC_SEQ_SUP_CNTL, 0x00000008);
> WREG32(mmMC_SEQ_SUP_CNTL, 0x00000010);
> @@ -239,9 +234,6 @@ static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev)
> break;
> udelay(1);
> }
> -
> - if (running)
> - WREG32(mmMC_SHARED_BLACKOUT_CNTL, blackout);
> }
>
> return 0;
More information about the dri-devel
mailing list