From: Joe Perches <joe@perches.com>
To: "Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>,
Chunming Zhou <David1.Zhou@amd.com>,
Ken Wang <Qingqing.Wang@amd.com>,
Tom St Denis <tom.stdenis@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] drm/amdgpu/gmc7: remove dead code
Date: Sun, 21 Aug 2016 11:29:11 -0700 [thread overview]
Message-ID: <1471804151.3746.7.camel@perches.com> (raw)
In-Reply-To: <1471802792-3059-1-git-send-email-xypron.glpk@gmx.de>
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;
next prev parent reply other threads:[~2016-08-21 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 18:06 [PATCH 1/1] drm/amdgpu/gmc7: remove dead code Heinrich Schuchardt
2016-08-21 18:29 ` Joe Perches [this message]
2016-08-21 18:45 ` Heinrich Schuchardt
2016-08-21 18:49 ` Joe Perches
2016-08-22 7:49 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471804151.3746.7.camel@perches.com \
--to=joe@perches.com \
--cc=David1.Zhou@amd.com \
--cc=Qingqing.Wang@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.stdenis@amd.com \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).