提交 dd67d7a6 编写于 作者: A Alex Deucher

drm/amdgpu/pm: mark pcie link/speed arrays as const

They are read only.
Noticed-by: NDave Airlie <airlied@linux.ie>
Reviewed-by: NEvan Quan <evan.quan@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 266b2d25
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
#define LINK_WIDTH_MAX 6 #define LINK_WIDTH_MAX 6
#define LINK_SPEED_MAX 3 #define LINK_SPEED_MAX 3
static __maybe_unused uint16_t link_width[] = {0, 1, 2, 4, 8, 12, 16}; static const __maybe_unused uint16_t link_width[] = {0, 1, 2, 4, 8, 12, 16};
static __maybe_unused uint16_t link_speed[] = {25, 50, 80, 160}; static const __maybe_unused uint16_t link_speed[] = {25, 50, 80, 160};
static const static const
struct smu_temperature_range __maybe_unused smu11_thermal_policy[] = struct smu_temperature_range __maybe_unused smu11_thermal_policy[] =
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
#define LINK_WIDTH_MAX 6 #define LINK_WIDTH_MAX 6
#define LINK_SPEED_MAX 3 #define LINK_SPEED_MAX 3
static int link_width[] = {0, 1, 2, 4, 8, 12, 16}; static const int link_width[] = {0, 1, 2, 4, 8, 12, 16};
static int link_speed[] = {25, 50, 80, 160}; static const int link_speed[] = {25, 50, 80, 160};
static int vega12_force_clock_level(struct pp_hwmgr *hwmgr, static int vega12_force_clock_level(struct pp_hwmgr *hwmgr,
enum pp_clock_type type, uint32_t mask); enum pp_clock_type type, uint32_t mask);
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
#define LINK_WIDTH_MAX 6 #define LINK_WIDTH_MAX 6
#define LINK_SPEED_MAX 3 #define LINK_SPEED_MAX 3
static int link_width[] = {0, 1, 2, 4, 8, 12, 16}; static const int link_width[] = {0, 1, 2, 4, 8, 12, 16};
static int link_speed[] = {25, 50, 80, 160}; static const int link_speed[] = {25, 50, 80, 160};
static void vega20_set_default_registry_data(struct pp_hwmgr *hwmgr) static void vega20_set_default_registry_data(struct pp_hwmgr *hwmgr)
{ {
......
...@@ -72,8 +72,8 @@ MODULE_FIRMWARE("amdgpu/aldebaran_smc.bin"); ...@@ -72,8 +72,8 @@ MODULE_FIRMWARE("amdgpu/aldebaran_smc.bin");
#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK 0xC000 #define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK 0xC000
#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT 0xE #define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT 0xE
static int link_width[] = {0, 1, 2, 4, 8, 12, 16}; static const int link_width[] = {0, 1, 2, 4, 8, 12, 16};
static int link_speed[] = {25, 50, 80, 160}; static const int link_speed[] = {25, 50, 80, 160};
int smu_v13_0_init_microcode(struct smu_context *smu) int smu_v13_0_init_microcode(struct smu_context *smu)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册