From: Alex Deucher <alexdeucher@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: "Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"xinhui pan" <Xinhui.Pan@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] drm/amd/display: Remove redundant initialization of variable result
Date: Thu, 7 Oct 2021 11:35:10 -0400 [thread overview]
Message-ID: <CADnq5_P2ZC5oaDZYPZixxH6BLoPZfvwWQqiGM2msQAcA3ebL8Q@mail.gmail.com> (raw)
In-Reply-To: <20211007120637.14459-1-colin.king@canonical.com>
Applied. Thanks!
Alex
On Thu, Oct 7, 2021 at 8:06 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable result is being initialized with a value that is never
> read, it is being updated immediately afterwards in both branches
> of an if statement. The assignment 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_dpia.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
> index 6936b9d549e5..8387767ec1b3 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
> @@ -774,7 +774,7 @@ static enum link_training_result dpia_training_eq_phase(struct dc_link *link,
> struct link_training_settings *lt_settings,
> uint32_t hop)
> {
> - enum link_training_result result = LINK_TRAINING_EQ_FAIL_EQ;
> + enum link_training_result result;
>
> if (link->lttpr_mode == LTTPR_MODE_NON_TRANSPARENT)
> result = dpia_training_eq_non_transparent(link, lt_settings, hop);
> --
> 2.32.0
>
prev parent reply other threads:[~2021-10-07 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 12:06 [PATCH][next] drm/amd/display: Remove redundant initialization of variable result Colin King
2021-10-07 15:35 ` Alex Deucher [this message]
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=CADnq5_P2ZC5oaDZYPZixxH6BLoPZfvwWQqiGM2msQAcA3ebL8Q@mail.gmail.com \
--to=alexdeucher@gmail.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=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sunpeng.li@amd.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;
as well as URLs for NNTP newsgroup(s).