• Tom St Denis's avatar
    drm/amd/amdgpu: Fix compiler warning in df driver · 06b668c1
    Tom St Denis authored
    Fix this warning:
    
      CC [M]  drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.o
    In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43,
                     from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23:
    drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function ‘df_v3_6_pmc_get_count’:
    ./include/drm/drm_print.h:487:2: warning: ‘hi_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      487 |  __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
          |  ^~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:25: note: ‘hi_base_addr’ was declared here
      649 |  uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;
          |                         ^~~~~~~~~~~~
    In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43,
                     from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23:
    ./include/drm/drm_print.h:487:2: warning: ‘lo_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      487 |  __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
          |  ^~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:11: note: ‘lo_base_addr’ was declared here
      649 |  uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;
    Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    06b668c1
df_v3_6.c 18.5 KB