drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals
authorTom Rix <trix@redhat.com>
Fri, 14 Apr 2023 12:03:44 +0000 (08:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Apr 2023 20:28:50 +0000 (16:28 -0400)
commit8d9cdb4674f6e4e7fc789f8184a58c73eeadc16c
treecf26bffa2737c853774187ac66171e74ee303d04
parent4de867fc237487ce2951a8231d7390237d3f3be8
drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals

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: Tom Rix <trix@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c