[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a190bcd5-cda8-84c6-093a-98438a605032@amd.com>
Date: Fri, 31 May 2019 20:19:03 +0000
From: Harry Wentland <hwentlan@....com>
To: Colin King <colin.king@...onical.com>,
"Koo, Anthony" <Anthony.Koo@....com>,
"Wentland, Harry" <Harry.Wentland@....com>,
"Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Koenig, Christian" <Christian.Koenig@....com>,
"Zhou, David(ChunMing)" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] drm/amd/display: remove redundant assignment to
status
On 2019-05-30 12:12 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@...onical.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@...onical.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;
>
Powered by blists - more mailing lists