From: Mario Limonciello <mario.limonciello@amd.com>
To: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>,
gautham.shenoy@amd.com, perry.yuan@amd.com, rafael@kernel.org,
viresh.kumar@linaro.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] cpufreq/amd-pstate: Remove the redundant verify() function
Date: Wed, 16 Oct 2024 09:57:41 -0500 [thread overview]
Message-ID: <7d1e8f79-9a07-405e-919d-ea2198b1a931@amd.com> (raw)
In-Reply-To: <20241016144639.135610-2-Dhananjay.Ugwekar@amd.com>
On 10/16/2024 09:46, Dhananjay Ugwekar wrote:
> Merge the two verify() callback functions and rename the
> cpufreq_policy_data argument for better readability.
>
> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/cpufreq/amd-pstate.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index b7a17a3ef122..fa16d72d6058 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -527,10 +527,10 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
> cpufreq_cpu_put(policy);
> }
>
> -static int amd_pstate_verify(struct cpufreq_policy_data *policy)
> +static int amd_pstate_verify(struct cpufreq_policy_data *policy_data)
> {
> - cpufreq_verify_within_cpu_limits(policy);
> -
> + cpufreq_verify_within_cpu_limits(policy_data);
> + pr_debug("policy_max =%d, policy_min=%d\n", policy_data->max, policy_data->min);
> return 0;
> }
>
> @@ -1661,13 +1661,6 @@ static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
> return 0;
> }
>
> -static int amd_pstate_epp_verify_policy(struct cpufreq_policy_data *policy)
> -{
> - cpufreq_verify_within_cpu_limits(policy);
> - pr_debug("policy_max =%d, policy_min=%d\n", policy->max, policy->min);
> - return 0;
> -}
> -
> static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
> {
> struct amd_cpudata *cpudata = policy->driver_data;
> @@ -1723,7 +1716,7 @@ static struct cpufreq_driver amd_pstate_driver = {
>
> static struct cpufreq_driver amd_pstate_epp_driver = {
> .flags = CPUFREQ_CONST_LOOPS,
> - .verify = amd_pstate_epp_verify_policy,
> + .verify = amd_pstate_verify,
> .setpolicy = amd_pstate_epp_set_policy,
> .init = amd_pstate_epp_cpu_init,
> .exit = amd_pstate_epp_cpu_exit,
next prev parent reply other threads:[~2024-10-16 14:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 14:46 [PATCH v2 0/2] cpufreq/amd-pstate: Set initial min_freq to lowest_nonlinear_freq Dhananjay Ugwekar
2024-10-16 14:46 ` [PATCH v2 1/2] cpufreq/amd-pstate: Remove the redundant verify() function Dhananjay Ugwekar
2024-10-16 14:57 ` Mario Limonciello [this message]
2024-10-17 3:47 ` Gautham R. Shenoy
2024-10-16 14:46 ` [PATCH v2 2/2] cpufreq/amd-pstate: Set the initial min_freq to lowest_nonlinear_freq Dhananjay Ugwekar
2024-10-16 14:57 ` Mario Limonciello
2024-10-17 4:32 ` Dhananjay Ugwekar
2024-10-17 3:56 ` Gautham R. Shenoy
2024-10-17 4:29 ` Dhananjay Ugwekar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d1e8f79-9a07-405e-919d-ea2198b1a931@amd.com \
--to=mario.limonciello@amd.com \
--cc=Dhananjay.Ugwekar@amd.com \
--cc=gautham.shenoy@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®