[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtX/mo8XmX+eODQF@amd.com>
Date: Tue, 19 Jul 2022 08:49:30 +0800
From: Huang Rui <ray.huang@....com>
To: "Yuan, Perry" <Perry.Yuan@....com>
Cc: "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
"Sharma, Deepak" <Deepak.Sharma@....com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"Fontenot, Nathan" <Nathan.Fontenot@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Su, Jinzhou (Joe)" <Jinzhou.Su@....com>,
"Huang, Shimmer" <Shimmer.Huang@....com>,
"Du, Xiaojian" <Xiaojian.Du@....com>,
"Meng, Li (Jassmine)" <Li.Meng@....com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 05/13] cpufreq: amd-pstate: simplify cpudata pointer
assignment
On Fri, Jul 15, 2022 at 06:04:24PM +0800, Yuan, Perry wrote:
> move the cpudata assignment to cpudata declaration which
> will simplify the functions.
>
> No functional change intended.
>
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
> Signed-off-by: Perry Yuan <Perry.Yuan@....com>
Reviewed-by: Huang Rui <ray.huang@....com>
> ---
> drivers/cpufreq/amd-pstate.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index d8c4153dbe4f..0c8256638ed7 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -574,9 +574,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
>
> static int amd_pstate_cpu_exit(struct cpufreq_policy *policy)
> {
> - struct amd_cpudata *cpudata;
> -
> - cpudata = policy->driver_data;
> + struct amd_cpudata *cpudata = policy->driver_data;
>
> freq_qos_remove_request(&cpudata->req[1]);
> freq_qos_remove_request(&cpudata->req[0]);
> @@ -618,9 +616,7 @@ static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy,
> char *buf)
> {
> int max_freq;
> - struct amd_cpudata *cpudata;
> -
> - cpudata = policy->driver_data;
> + struct amd_cpudata *cpudata = policy->driver_data;
>
> max_freq = amd_get_max_freq(cpudata);
> if (max_freq < 0)
> @@ -633,9 +629,7 @@ static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *poli
> char *buf)
> {
> int freq;
> - struct amd_cpudata *cpudata;
> -
> - cpudata = policy->driver_data;
> + struct amd_cpudata *cpudata = policy->driver_data;
>
> freq = amd_get_lowest_nonlinear_freq(cpudata);
> if (freq < 0)
> --
> 2.32.0
>
Powered by blists - more mailing lists