mirror_ubuntu-kernels/drivers/gpu/drm/amd/pm
Tom Rix 8d9cdb4674 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>
2023-04-18 16:28:50 -04:00
..
inc drm/amdgpu: added a sysfs interface for thermal throttling 2023-02-23 17:36:00 -05:00
legacy-dpm drm/amd: Use amdgpu_ucode_release helper for si 2023-01-10 14:32:58 -05:00
powerplay drm/amd/pm: avoid unaligned access warnings 2023-02-15 22:25:01 -05:00
swsmu drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals 2023-04-18 16:28:50 -04:00
amdgpu_dpm_internal.c drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-07 18:03:50 -05:00
amdgpu_dpm.c drm/amdgpu: added a sysfs interface for thermal throttling 2023-02-23 17:36:00 -05:00
amdgpu_pm.c drm/amd/pm: Fix incorrect comment about Vangogh power cap support 2023-04-11 18:03:44 -04:00
Makefile drm/amd/pm: relocate the power related headers 2022-01-14 17:51:14 -05:00