drm/amdgpu: increment queue when iterating on this variable.
Subsystems (2)
PATCH 1/1 drm/amdgpu: increment queue when iterating on this variable.
gfx_v7_0_print_status contains a for loop on variable queue which does not update this variable between each iteration. This is bug is reported by clang while building allmodconfig LLVMLinux on x86_64:
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5126:19: error: variable
'queue' used in loop condition not modified in loop body
[-Werror,-Wloop-analysis]
for (queue = 0; queue < 8; i++) {
^~~~~Fix this by incrementing variable queue instead of i in this loop.
--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -5122,7 +5122,7 @@ static void gfx_v7_0_print_status(void *handle)dev_info (adev->dev," CP_HPD_EOP_CONTROL=0x%08X\n" ,RREG32 (mmCP_HPD_EOP_CONTROL)); -for (queue =0 ; queue <8 ; i++) { +for (queue =0 ; queue <8 ; queue++) {cik_srbm_select (adev, me, pipe, queue,0 );dev_info (adev->dev," queue: %d\n" , queue); dev_info(adev->dev, " CP_PQ_WPTR_POLL_CNTL=0x%08X\n",
Signature · 1 line
2.5.0
Alex Deucher
AppliedQuoted 10 lines · Nicolas Iooss
gfx_v7_0_print_statuscontains a for loop on variable queue which does not update this variable between each iteration. This is bug is reported by clang while building allmodconfig LLVMLinux onx86_64:drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5126:19: error: variable 'queue' used in loop condition not modified in loop body [-Werror,-Wloop-analysis] for (queue = 0; queue < 8; i++) { ^~~~~
Quoted 3 lines
Fix this by incrementing variable queue instead of i in this loop.
Signed-off-by Nicolas Iooss <[email protected]>
Applied. thanks!
Alex
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1
-2@@ -5122,7 +5122,7 @@ static void gfx_v7_0_print_status(void *handle)dev_info (adev->dev," CP_HPD_EOP_CONTROL=0x%08X\n" ,RREG32 (mmCP_HPD_EOP_CONTROL)); -for (queue =0 ; queue <8 ; i++) { +for (queue =0 ; queue <8 ; queue++) {cik_srbm_select (adev, me, pipe, queue,0 );dev_info (adev->dev," queue: %d\n" , queue); dev_info(adev->dev, " CP_PQ_WPTR_POLL_CNTL=0x%08X\n", --2.5.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel