• M
    drm/amdgpu/gfx10: Avoid uninitialised variable 'index' · 8fab8e2e
    Mike Lothian 提交于
    This stops clang complaining:
    
    drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3846:6: warning: variable 'index' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
            if (ring->is_mes_queue) {
                ^~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3903:30: note: uninitialized use occurs here
            amdgpu_device_wb_free(adev, index);
                                        ^~~~~
    drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3846:2: note: remove the 'if' if its condition is always false
            if (ring->is_mes_queue) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3839:16: note: initialize the variable 'index' to silence this warning
            unsigned index;
                          ^
                           = 0
    Signed-off-by: NMike Lothian <mike@fireburn.co.uk>
    Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
    8fab8e2e
gfx_v10_0.c 437.5 KB