All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	amd-gfx@lists.freedesktop.org
Cc: Wesley Chalmers <Wesley.Chalmers@amd.com>,
	Alex Deucher <Alexander.Deucher@amd.com>,
	Alex Deucher <alexdeucher@gmail.com>,
	Harry Wentland <Harry.Wentland@amd.com>,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>,
	Hersen Wu <hersenxs.wu@amd.com>, Dave Airlie <airlied@gmail.com>,
	Josip Pavic <Josip.Pavic@amd.com>,
	Bindu Ramamurthy <bindu.r@amd.com>,
	Martin Leung <Martin.Leung@amd.com>
Subject: [PATCH] drm/amd/display: Initialize stack variable
Date: Tue, 29 Dec 2020 11:57:40 -0500	[thread overview]
Message-ID: <20201229165740.519759-1-Rodrigo.Siqueira@amd.com> (raw)

From: Wesley Chalmers <Wesley.Chalmers@amd.com>

The stack variable "val" is potentially unpopulate it, so initialize it
with the value 0xf (indicating an invalid mux).

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Josip Pavic <Josip.Pavic@amd.com>
Cc: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
index a46cb20596fe..b096011acb49 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
@@ -470,7 +470,7 @@ void mpc1_cursor_lock(struct mpc *mpc, int opp_id, bool lock)
 unsigned int mpc1_get_mpc_out_mux(struct mpc *mpc, int opp_id)
 {
 	struct dcn10_mpc *mpc10 = TO_DCN10_MPC(mpc);
-	uint32_t val;
+	uint32_t val = 0xf;
 
 	if (opp_id < MAX_OPP && REG(MUX[opp_id]))
 		REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);
-- 
2.30.0.rc2


WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	amd-gfx@lists.freedesktop.org
Cc: Josip Pavic <Josip.Pavic@amd.com>,
	Wesley Chalmers <Wesley.Chalmers@amd.com>,
	Hersen Wu <hersenxs.wu@amd.com>,
	Martin Leung <Martin.Leung@amd.com>,
	Alex Deucher <Alexander.Deucher@amd.com>,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>,
	Bindu Ramamurthy <bindu.r@amd.com>
Subject: [PATCH] drm/amd/display: Initialize stack variable
Date: Tue, 29 Dec 2020 11:57:40 -0500	[thread overview]
Message-ID: <20201229165740.519759-1-Rodrigo.Siqueira@amd.com> (raw)

From: Wesley Chalmers <Wesley.Chalmers@amd.com>

The stack variable "val" is potentially unpopulate it, so initialize it
with the value 0xf (indicating an invalid mux).

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Josip Pavic <Josip.Pavic@amd.com>
Cc: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
index a46cb20596fe..b096011acb49 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
@@ -470,7 +470,7 @@ void mpc1_cursor_lock(struct mpc *mpc, int opp_id, bool lock)
 unsigned int mpc1_get_mpc_out_mux(struct mpc *mpc, int opp_id)
 {
 	struct dcn10_mpc *mpc10 = TO_DCN10_MPC(mpc);
-	uint32_t val;
+	uint32_t val = 0xf;
 
 	if (opp_id < MAX_OPP && REG(MUX[opp_id]))
 		REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);
-- 
2.30.0.rc2

_______________________________________________
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: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	amd-gfx@lists.freedesktop.org
Cc: Josip Pavic <Josip.Pavic@amd.com>,
	Wesley Chalmers <Wesley.Chalmers@amd.com>,
	Dave Airlie <airlied@gmail.com>,
	Alex Deucher <alexdeucher@gmail.com>,
	Hersen Wu <hersenxs.wu@amd.com>,
	Martin Leung <Martin.Leung@amd.com>,
	Alex Deucher <Alexander.Deucher@amd.com>,
	Harry Wentland <Harry.Wentland@amd.com>,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>,
	Bindu Ramamurthy <bindu.r@amd.com>
Subject: [PATCH] drm/amd/display: Initialize stack variable
Date: Tue, 29 Dec 2020 11:57:40 -0500	[thread overview]
Message-ID: <20201229165740.519759-1-Rodrigo.Siqueira@amd.com> (raw)

From: Wesley Chalmers <Wesley.Chalmers@amd.com>

The stack variable "val" is potentially unpopulate it, so initialize it
with the value 0xf (indicating an invalid mux).

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Josip Pavic <Josip.Pavic@amd.com>
Cc: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
index a46cb20596fe..b096011acb49 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
@@ -470,7 +470,7 @@ void mpc1_cursor_lock(struct mpc *mpc, int opp_id, bool lock)
 unsigned int mpc1_get_mpc_out_mux(struct mpc *mpc, int opp_id)
 {
 	struct dcn10_mpc *mpc10 = TO_DCN10_MPC(mpc);
-	uint32_t val;
+	uint32_t val = 0xf;
 
 	if (opp_id < MAX_OPP && REG(MUX[opp_id]))
 		REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);
-- 
2.30.0.rc2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2020-12-29 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 16:57 Rodrigo Siqueira [this message]
2020-12-29 16:57 ` [PATCH] drm/amd/display: Initialize stack variable Rodrigo Siqueira
2020-12-29 16:57 ` Rodrigo Siqueira

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=20201229165740.519759-1-Rodrigo.Siqueira@amd.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Josip.Pavic@amd.com \
    --cc=Martin.Leung@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Wesley.Chalmers@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bindu.r@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hersenxs.wu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.