public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [RFC PATCH] drm/amdgpu: Fix variable internal_reg_offset set but not used
@ 2025-09-05  2:15 Brahmajit Das
  0 siblings, 0 replies; only message in thread
From: Brahmajit Das @ 2025-09-05  2:15 UTC (permalink / raw)
  To: amd-gfx, linux-next
  Cc: alexander.deucher, christian.koenig, boyuan.zhang, leo.liu,
	davidwu2, listout

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-05  2:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05  2:15 [RFC PATCH] drm/amdgpu: Fix variable internal_reg_offset set but not used Brahmajit Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox