From: Harry Wentland <harry.wentland@amd.com>
To: Pu Lehui <pulehui@huawei.com>,
sunpeng.li@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie,
daniel@ffwll.ch, Anson.Jacob@amd.com,
Nicholas.Kazlauskas@amd.com, roman.li@amd.com
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, zhangjinhao2@huawei.com
Subject: Re: [PATCH -next] drm/amd/display: remove unused variable 'dc'
Date: Thu, 17 Jun 2021 15:04:21 -0400 [thread overview]
Message-ID: <7758a4ef-0b8e-8873-fac0-7db7a2f6402b@amd.com> (raw)
In-Reply-To: <20210617011632.187690-1-pulehui@huawei.com>
On 2021-06-16 9:16 p.m., Pu Lehui wrote:
> GCC reports the following warning with W=1:
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13:
> warning:
> variable ‘dc’ set but not used [-Wunused-but-set-variable]
> 70 | struct dc *dc = NULL;
> | ^~
>
> This variable is not used in function, this commit remove it to
> fix the warning.
>
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> index f7c77ae0d965..70a554f1e725 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> @@ -67,14 +67,12 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream)
> struct dc_link *link = NULL;
> struct psr_config psr_config = {0};
> struct psr_context psr_context = {0};
> - struct dc *dc = NULL;
> bool ret = false;
>
> if (stream == NULL)
> return false;
>
> link = stream->link;
> - dc = link->ctx->dc;
>
> psr_config.psr_version = link->dpcd_caps.psr_caps.psr_version;
>
>
next prev parent reply other threads:[~2021-06-17 19:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 1:16 Pu Lehui
2021-06-17 19:04 ` Harry Wentland [this message]
2021-06-18 20:34 ` Alex Deucher
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=7758a4ef-0b8e-8873-fac0-7db7a2f6402b@amd.com \
--to=harry.wentland@amd.com \
--cc=Anson.Jacob@amd.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pulehui@huawei.com \
--cc=roman.li@amd.com \
--cc=sunpeng.li@amd.com \
--cc=zhangjinhao2@huawei.com \
/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
all inboxes | Powered by JetHome®