mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
cpufreq/amd-pstate: Drop NULL value from amd_pstate_mode_string
None of the users actually look for the NULL value. To avoid risk of regression introducing a new value but forgetting to add a string add a static assert to test AMD_PSTATE_MAX matches the array size. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
This commit is contained in:
parent
7e17f48667
commit
06791bc017
|
|
@ -65,8 +65,8 @@ static const char * const amd_pstate_mode_string[] = {
|
|||
[AMD_PSTATE_PASSIVE] = "passive",
|
||||
[AMD_PSTATE_ACTIVE] = "active",
|
||||
[AMD_PSTATE_GUIDED] = "guided",
|
||||
NULL,
|
||||
};
|
||||
static_assert(ARRAY_SIZE(amd_pstate_mode_string) == AMD_PSTATE_MAX);
|
||||
|
||||
const char *amd_pstate_get_mode_string(enum amd_pstate_mode mode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user