From: Alex Deucher <alexdeucher@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: "Colin King" <colin.king@canonical.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Anson Jacob" <Anson.Jacob@amd.com>,
"Mikita Lipski" <Mikita.Lipski@amd.com>,
"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: fix the return of the uninitialized value in ret
Date: Tue, 2 Mar 2021 12:51:05 -0500 [thread overview]
Message-ID: <CADnq5_Nrg_L+9vFhsxbbeimSvWM2xkD7Og8aARmYGSMUE9rx+Q@mail.gmail.com> (raw)
In-Reply-To: <b9a11c62-f469-8f5b-9585-74b73cd5a9db@amd.com>
Applied. Thanks!
Alex
On Tue, Mar 2, 2021 at 10:03 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2021-03-02 9:05 a.m., Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or
> > SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is
> > checked for > 0 at the end of the function. Ret should be initialized,
> > I believe setting it to zero is a correct default.
> >
> > Addresses-Coverity: ("Uninitialized scalar variable")
> > Fixes: bd0c064c161c ("drm/amd/display: Add return code instead of boolean for future use")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > index 5159399f8239..5750818db8f6 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > @@ -530,7 +530,7 @@ bool dm_helpers_dp_write_dsc_enable(
> > {
> > uint8_t enable_dsc = enable ? 1 : 0;
> > struct amdgpu_dm_connector *aconnector;
> > - uint8_t ret;
> > + uint8_t ret = 0;
> >
> > if (!stream)
> > return false;
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: "Anson Jacob" <Anson.Jacob@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"David Airlie" <airlied@linux.ie>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Colin King" <colin.king@canonical.com>,
"Mikita Lipski" <Mikita.Lipski@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH][next] drm/amd/display: fix the return of the uninitialized value in ret
Date: Tue, 2 Mar 2021 12:51:05 -0500 [thread overview]
Message-ID: <CADnq5_Nrg_L+9vFhsxbbeimSvWM2xkD7Og8aARmYGSMUE9rx+Q@mail.gmail.com> (raw)
In-Reply-To: <b9a11c62-f469-8f5b-9585-74b73cd5a9db@amd.com>
Applied. Thanks!
Alex
On Tue, Mar 2, 2021 at 10:03 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2021-03-02 9:05 a.m., Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or
> > SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is
> > checked for > 0 at the end of the function. Ret should be initialized,
> > I believe setting it to zero is a correct default.
> >
> > Addresses-Coverity: ("Uninitialized scalar variable")
> > Fixes: bd0c064c161c ("drm/amd/display: Add return code instead of boolean for future use")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > index 5159399f8239..5750818db8f6 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > @@ -530,7 +530,7 @@ bool dm_helpers_dp_write_dsc_enable(
> > {
> > uint8_t enable_dsc = enable ? 1 : 0;
> > struct amdgpu_dm_connector *aconnector;
> > - uint8_t ret;
> > + uint8_t ret = 0;
> >
> > if (!stream)
> > return false;
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: "Anson Jacob" <Anson.Jacob@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"David Airlie" <airlied@linux.ie>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Colin King" <colin.king@canonical.com>,
"Mikita Lipski" <Mikita.Lipski@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH][next] drm/amd/display: fix the return of the uninitialized value in ret
Date: Tue, 2 Mar 2021 12:51:05 -0500 [thread overview]
Message-ID: <CADnq5_Nrg_L+9vFhsxbbeimSvWM2xkD7Og8aARmYGSMUE9rx+Q@mail.gmail.com> (raw)
In-Reply-To: <b9a11c62-f469-8f5b-9585-74b73cd5a9db@amd.com>
Applied. Thanks!
Alex
On Tue, Mar 2, 2021 at 10:03 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2021-03-02 9:05 a.m., Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or
> > SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is
> > checked for > 0 at the end of the function. Ret should be initialized,
> > I believe setting it to zero is a correct default.
> >
> > Addresses-Coverity: ("Uninitialized scalar variable")
> > Fixes: bd0c064c161c ("drm/amd/display: Add return code instead of boolean for future use")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > index 5159399f8239..5750818db8f6 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> > @@ -530,7 +530,7 @@ bool dm_helpers_dp_write_dsc_enable(
> > {
> > uint8_t enable_dsc = enable ? 1 : 0;
> > struct amdgpu_dm_connector *aconnector;
> > - uint8_t ret;
> > + uint8_t ret = 0;
> >
> > if (!stream)
> > return false;
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-03-02 20:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 14:05 [PATCH][next] drm/amd/display: fix the return of the uninitialized value in ret Colin King
2021-03-02 14:05 ` Colin King
2021-03-02 14:05 ` Colin King
2021-03-02 15:03 ` Harry Wentland
2021-03-02 15:03 ` Harry Wentland
2021-03-02 15:03 ` Harry Wentland
2021-03-02 17:51 ` Alex Deucher [this message]
2021-03-02 17:51 ` Alex Deucher
2021-03-02 17:51 ` 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=CADnq5_Nrg_L+9vFhsxbbeimSvWM2xkD7Og8aARmYGSMUE9rx+Q@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=Anson.Jacob@amd.com \
--cc=Mikita.Lipski@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.