mirror_ubuntu-kernels/drivers/gpu/drm/amd
Mike Lothian 8fab8e2ecc drm/amdgpu/gfx10: Avoid uninitialised variable 'index'
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: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-05-05 16:50:15 -04:00
..
acp
amdgpu drm/amdgpu/gfx10: Avoid uninitialised variable 'index' 2022-05-05 16:50:15 -04:00
amdkfd drm/amdkfd: Add KFD support for soc21 v3 2022-05-04 10:43:54 -04:00
display drm/amd/display: 3.2.184 2022-05-04 10:43:55 -04:00
include drm/amdgpu: add irq sources for vcn v4_0 2022-05-04 10:43:56 -04:00
pm drm/amdgpu: add FGCG support 2022-05-04 10:02:56 -04:00