LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: Colin King <colin.king@canonical.com>,
"Koo, Anthony" <Anthony.Koo@amd.com>,
"Wentland, Harry" <Harry.Wentland@amd.com>,
"Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Koenig, Christian" <Christian.Koenig@amd.com>,
"Zhou, David(ChunMing)" <David1.Zhou@amd.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Cc: "kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] drm/amd/display: remove redundant assignment to status
Date: Fri, 31 May 2019 20:19:03 +0000 [thread overview]
Message-ID: <a190bcd5-cda8-84c6-093a-98438a605032@amd.com> (raw)
In-Reply-To: <20190530161219.2507-1-colin.king@canonical.com>
On 2019-05-30 12:12 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable status is initialized with a value that is never read
> and status is reassigned several statements later. This initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 65d6caedbd82..cf6166a1be53 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -2367,7 +2367,7 @@ static bool retrieve_link_cap(struct dc_link *link)
> union down_stream_port_count down_strm_port_count;
> union edp_configuration_cap edp_config_cap;
> union dp_downstream_port_present ds_port = { 0 };
> - enum dc_status status = DC_ERROR_UNEXPECTED;
> + enum dc_status status;
Not sure this improves the situation.
I'd prefer to have a default here in case someone changes the code below
and forgets to set the status.
Harry
> uint32_t read_dpcd_retry_cnt = 3;
> int i;
> struct dp_sink_hw_fw_revision dp_hw_fw_revision;
>
next prev parent reply other threads:[~2019-05-31 20:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 16:12 Colin King
2019-05-31 20:19 ` Harry Wentland [this message]
2019-06-06 10:30 ` Dan Carpenter
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=a190bcd5-cda8-84c6-093a-98438a605032@amd.com \
--to=hwentlan@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Anthony.Koo@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH][next] drm/amd/display: remove redundant assignment to status' \
/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
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).