]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: increment queue when iterating on this variable.
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Sat, 1 Aug 2015 13:55:38 +0000 (21:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Aug 2015 18:26:48 +0000 (14:26 -0400)
commitf6349ecf28f545813f2e896e1b9b05f7590f9cb3
treec7cc3b23b3903dab9c0852316acc98aceec7c403
parentd0e74b4dff0db260f1786fd40e005d84567f9ca0
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: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c