Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

From: Gautham R. Shenoy
Date: Wed Jun 05 2024 - 00:30:07 EST


On Sun, Jun 02, 2024 at 06:57:12PM +0300, Andy Shevchenko wrote:
> Make two APIs look similar. Hence convert match_string() to be
> a 2-argument macro. In order to avoid unneeded churn, convert
> all users as well. There is no functional change intended.


> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 1b7e82a0ad2e..b6f52f44625f 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1117,9 +1117,9 @@ static ssize_t store_energy_performance_preference(
> if (ret != 1)
> return -EINVAL;
>
> - ret = match_string(energy_perf_strings, -1, str_preference);
> + ret = __match_string(energy_perf_strings, -1, str_preference);
> if (ret < 0)
> - return -EINVAL;
> + return ret;
>
> mutex_lock(&amd_pstate_limits_lock);
> ret = amd_pstate_set_energy_pref_index(cpudata, ret);


For drivers/cpufreq/amd-pstate.c

Acked-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>

--
Thanks and Regards
gautham.