AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Huang <Tim.Huang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Alexander.Deucher@amd.com>, <christian.koenig@amd.com>,
	Tim Huang <Tim.Huang@amd.com>
Subject: [PATCH 3/3] drm/amdgpu: fix uninitialized variable warning for jpeg_v4
Date: Mon, 6 May 2024 14:12:07 +0800	[thread overview]
Message-ID: <20240506061207.2017901-3-Tim.Huang@amd.com> (raw)
In-Reply-To: <20240506061207.2017901-1-Tim.Huang@amd.com>

Clear warning that using uninitialized variable r.

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
index da6bb9022b80..4c8f9772437b 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
@@ -187,7 +187,7 @@ static int jpeg_v4_0_5_hw_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct amdgpu_ring *ring;
-	int r, i;
+	int i, r = 0;
 
 	// TODO: Enable ring test with DPG support
 	if (adev->pg_flags & AMD_PG_SUPPORT_JPEG_DPG) {
-- 
2.39.2


  parent reply	other threads:[~2024-05-06  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06  6:12 [PATCH 1/3] drm/amdgpu: fix uninitialized variable warning for sdma_v7 Tim Huang
2024-05-06  6:12 ` [PATCH 2/3] drm/amdgpu: fix uninitialized variable warning for amdgpu_xgmi Tim Huang
2024-05-06  6:12 ` Tim Huang [this message]
2024-05-06 15:13   ` [PATCH 3/3] drm/amdgpu: fix uninitialized variable warning for jpeg_v4 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=20240506061207.2017901-3-Tim.Huang@amd.com \
    --to=tim.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@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