[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250902075624.gcacapuytmwenaxo@vireshk-i7>
Date: Tue, 2 Sep 2025 13:26:24 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
Cc: "Rafael J . wysocki" <rafael@...nel.org>,
zhenglifeng <zhenglifeng1@...wei.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] cpufreq: Drop redundant freq_table parameter
On 02-09-25, 15:33, Zihuan Zhang wrote:
> Since commit e0b3165ba521 ("cpufreq: add 'freq_table' in struct
> cpufreq_policy"),
> freq_table has been stored in struct cpufreq_policy instead of being
> maintained separately.
>
> However, several helpers in freq_table.c still take both policy and
> freq_table as parameters, even though policy->freq_table can always be
> used. This leads to redundant function arguments and increases the chance
> of inconsistencies.
>
> This patch removes the unnecessary freq_table argument from these functions
> and updates their callers to only pass policy. This makes the code simpler,
> more consistent, and avoids duplication.
>
> V2:
> - Merge three patches into one to fix compile error
> - simple the check suggested by Viresh Kumar
>
> Signed-off-by: Zihuan Zhang <zhangzihuan@...inos.cn>
> ---
> drivers/cpufreq/cpufreq.c | 2 +-
> drivers/cpufreq/freq_table.c | 14 ++++++--------
> drivers/cpufreq/sh-cpufreq.c | 6 ++----
> drivers/cpufreq/virtual-cpufreq.c | 2 +-
> include/linux/cpufreq.h | 7 +++----
> 5 files changed, 13 insertions(+), 18 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists