提交 0fd64291 编写于 作者: N Nicolas Iooss 提交者: Alex Deucher

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.
Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 a0e2f50b
...@@ -5122,7 +5122,7 @@ static void gfx_v7_0_print_status(void *handle) ...@@ -5122,7 +5122,7 @@ static void gfx_v7_0_print_status(void *handle)
dev_info(adev->dev, " CP_HPD_EOP_CONTROL=0x%08X\n", dev_info(adev->dev, " CP_HPD_EOP_CONTROL=0x%08X\n",
RREG32(mmCP_HPD_EOP_CONTROL)); 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); cik_srbm_select(adev, me, pipe, queue, 0);
dev_info(adev->dev, " queue: %d\n", queue); dev_info(adev->dev, " queue: %d\n", queue);
dev_info(adev->dev, " CP_PQ_WPTR_POLL_CNTL=0x%08X\n", dev_info(adev->dev, " CP_PQ_WPTR_POLL_CNTL=0x%08X\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册