public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Brahmajit Das <listout@listout•xyz>
To: amd-gfx@lists•freedesktop.org, linux-next@vger•kernel.org
Cc: alexander.deucher@amd•com, christian.koenig@amd•com,
	boyuan.zhang@amd•com, leo.liu@amd•com, davidwu2@amd•com,
	listout@listout•xyz
Subject: [RFC PATCH] drm/amdgpu: Fix variable internal_reg_offset set but not used
Date: Fri,  5 Sep 2025 07:45:50 +0530	[thread overview]
Message-ID: <20250905021550.47459-1-listout@listout.xyz> (raw)

This patch fixes build error with GCC 16, setting internal_reg_offset in
the marco fixes the build errors. Related to Statement-Exprs in GCC[0].

[0]: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html

Refer: https://lore.kernel.org/amd-gfx/x4ga2sfkszmylljox3p46ryog2owghv6hffo3rjj4o6xfjy7pd@jllj3us4heso/
Suggested-by: Wu, David <davidwu2@amd•com>
Signed-off-by: Brahmajit Das <listout@listout•xyz>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
index 6d9acd36041d..6630e5f95b7b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
@@ -129,6 +129,7 @@
 			internal_reg_offset = (0xFFFFF & addr);					\
 												\
 		internal_reg_offset >>= 2;							\
+		internal_reg_offset;								\
 	})
 
 #define RREG32_SOC15_DPG_MODE(inst_idx, offset, mask_en) 					\
@@ -190,6 +191,7 @@
 			internal_reg_offset = (0xFFFFF & addr);					\
 												\
 		internal_reg_offset >>= 2;							\
+		internal_reg_offset;								\
 	})
 
 #define WREG32_SOC24_DPG_MODE(inst_idx, offset, value, mask_en, indirect)		\
-- 
2.51.0


                 reply	other threads:[~2025-09-05  2:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250905021550.47459-1-listout@listout.xyz \
    --to=listout@listout$(echo .)xyz \
    --cc=alexander.deucher@amd$(echo .)com \
    --cc=amd-gfx@lists$(echo .)freedesktop.org \
    --cc=boyuan.zhang@amd$(echo .)com \
    --cc=christian.koenig@amd$(echo .)com \
    --cc=davidwu2@amd$(echo .)com \
    --cc=leo.liu@amd$(echo .)com \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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