RE: [PATCH v3 1/5] cpupower: Recognise amd-pstate active mode driver

From: Yuan, Perry
Date: Mon Jun 19 2023 - 23:10:19 EST


[AMD Official Use Only - General]

> -----Original Message-----
> From: Karny, Wyes <Wyes.Karny@xxxxxxx>
> Sent: Tuesday, June 20, 2023 3:05 AM
> To: trenn@xxxxxxxx; shuah@xxxxxxxxxx
> Cc: linux-pm@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; rafael@xxxxxxxxxx;
> Shenoy, Gautham Ranjal <gautham.shenoy@xxxxxxx>; Limonciello, Mario
> <Mario.Limonciello@xxxxxxx>; Huang, Ray <Ray.Huang@xxxxxxx>; Yuan,
> Perry <Perry.Yuan@xxxxxxx>; Karny, Wyes <Wyes.Karny@xxxxxxx>
> Subject: [PATCH v3 1/5] cpupower: Recognise amd-pstate active mode driver
>
> amd-pstate active mode driver name is "amd-pstate-epp". Use common prefix
> for string matching condition to recognise amd-pstate active mode driver.
>
> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>
> Signed-off-by: Wyes Karny <wyes.karny@xxxxxxx>
> ---
> tools/power/cpupower/utils/helpers/misc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/power/cpupower/utils/helpers/misc.c
> b/tools/power/cpupower/utils/helpers/misc.c
> index 9547b29254a7..0c56fc77f93b 100644
> --- a/tools/power/cpupower/utils/helpers/misc.c
> +++ b/tools/power/cpupower/utils/helpers/misc.c
> @@ -95,7 +95,7 @@ bool cpupower_amd_pstate_enabled(void)
> if (!driver)
> return ret;
>
> - if (!strcmp(driver, "amd-pstate"))
> + if (!strncmp(driver, "amd", 3))
> ret = true;
>
> cpufreq_put_driver(driver);
> --
> 2.34.1

Tested-by: Perry Yuan <Perry.Yuan@xxxxxxx>