• Tom Rix's avatar
    drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals · 8d9cdb46
    Tom Rix authored
    gcc with W=1 reports
    In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0.c:36:
    ./drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v13_0.h:66:18: error:
      ‘pmfw_decoded_link_width’ defined but not used [-Werror=unused-const-variable=]
       66 | static const int pmfw_decoded_link_width[7] = {0, 1, 2, 4, 8, 12, 16};
          |                  ^~~~~~~~~~~~~~~~~~~~~~~
    ./drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v13_0.h:65:18: error:
      ‘pmfw_decoded_link_speed’ defined but not used [-Werror=unused-const-variable=]
       65 | static const int pmfw_decoded_link_speed[5] = {1, 2, 3, 4, 5};
          |                  ^~~~~~~~~~~~~~~~~~~~~~~
    
    These variables are defined and used in smu_v13_0_7_ppt.c and smu_v13_0_0_ppt.c.
    There should be only one definition.  So define the variables as globals
    in smu_v13_0.c
    Signed-off-by: default avatarTom Rix <trix@redhat.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    8d9cdb46
smu_v13_0.h 9.42 KB