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 <[email protected]>
Signed-off-by: Brahmajit Das <[email protected]>
---
 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 via email to