[PATCH v1 0/3] cpufreq: drop redundant freq_table argument in helpers

Zihuan Zhang posted 3 patches 3 months, 1 week ago
drivers/cpufreq/cpufreq.c         |  2 +-
drivers/cpufreq/freq_table.c      | 14 ++++++--------
drivers/cpufreq/sh-cpufreq.c      |  2 +-
drivers/cpufreq/virtual-cpufreq.c |  2 +-
include/linux/cpufreq.h           |  7 +++----
5 files changed, 12 insertions(+), 15 deletions(-)
[PATCH v1 0/3] cpufreq: drop redundant freq_table argument in helpers
Posted by Zihuan Zhang 3 months, 1 week ago
This patchset updates the cpufreq core and drivers to fully adopt
the new policy->freq_table approach introduced in commit
e0b3165ba521 ("cpufreq: add 'freq_table' in struct cpufreq_policy").

Motivation:
- The frequency table is per-policy, not per-CPU, so redundant
  freq_table arguments in core helpers and drivers are no longer needed.
- Removing the extra argument reduces confusion and potential mistakes.

Patch details:

1. cpufreq: core: drop redundant freq_table argument in helpers
   - Remove freq_table parameters in core helper functions.
   - All helper functions now use policy directly.

2. cpufreq: drivers: remove redundant freq_table argument
   - Update cpufreq drivers to match the new core API.
   - Calls that previously passed a separate freq_table argument
   - No behavior changes, only API consistency.

Zihuan Zhang (3):
  cpufreq: Drop redundant freq_table parameter
  cpufreq: sh: drop redundant freq_table argument
  cpufreq: virtual: drop redundant freq_table argument

 drivers/cpufreq/cpufreq.c         |  2 +-
 drivers/cpufreq/freq_table.c      | 14 ++++++--------
 drivers/cpufreq/sh-cpufreq.c      |  2 +-
 drivers/cpufreq/virtual-cpufreq.c |  2 +-
 include/linux/cpufreq.h           |  7 +++----
 5 files changed, 12 insertions(+), 15 deletions(-)

-- 
2.25.1
Re: [PATCH v1 0/3] cpufreq: drop redundant freq_table argument in helpers
Posted by Viresh Kumar 3 months, 1 week ago
On 01-09-25, 19:25, Zihuan Zhang wrote:
> This patchset updates the cpufreq core and drivers to fully adopt
> the new policy->freq_table approach introduced in commit
> e0b3165ba521 ("cpufreq: add 'freq_table' in struct cpufreq_policy").
> 
> Motivation:
> - The frequency table is per-policy, not per-CPU, so redundant
>   freq_table arguments in core helpers and drivers are no longer needed.
> - Removing the extra argument reduces confusion and potential mistakes.
> 
> Patch details:
> 
> 1. cpufreq: core: drop redundant freq_table argument in helpers
>    - Remove freq_table parameters in core helper functions.
>    - All helper functions now use policy directly.
> 
> 2. cpufreq: drivers: remove redundant freq_table argument
>    - Update cpufreq drivers to match the new core API.
>    - Calls that previously passed a separate freq_table argument
>    - No behavior changes, only API consistency.
> 
> Zihuan Zhang (3):
>   cpufreq: Drop redundant freq_table parameter
>   cpufreq: sh: drop redundant freq_table argument
>   cpufreq: virtual: drop redundant freq_table argument

Individual patches must not break kernel compilation, but compilation
breaks after the first patch itself in your series as you have not
updated all the users.

Merge all three into a single patch.

-- 
viresh
Re: [PATCH v1 0/3] cpufreq: drop redundant freq_table argument in helpers
Posted by Zihuan Zhang 3 months, 1 week ago
在 2025/9/2 13:42, Viresh Kumar 写道:
> On 01-09-25, 19:25, Zihuan Zhang wrote:
>> This patchset updates the cpufreq core and drivers to fully adopt
>> the new policy->freq_table approach introduced in commit
>> e0b3165ba521 ("cpufreq: add 'freq_table' in struct cpufreq_policy").
>>
>> Motivation:
>> - The frequency table is per-policy, not per-CPU, so redundant
>>    freq_table arguments in core helpers and drivers are no longer needed.
>> - Removing the extra argument reduces confusion and potential mistakes.
>>
>> Patch details:
>>
>> 1. cpufreq: core: drop redundant freq_table argument in helpers
>>     - Remove freq_table parameters in core helper functions.
>>     - All helper functions now use policy directly.
>>
>> 2. cpufreq: drivers: remove redundant freq_table argument
>>     - Update cpufreq drivers to match the new core API.
>>     - Calls that previously passed a separate freq_table argument
>>     - No behavior changes, only API consistency.
>>
>> Zihuan Zhang (3):
>>    cpufreq: Drop redundant freq_table parameter
>>    cpufreq: sh: drop redundant freq_table argument
>>    cpufreq: virtual: drop redundant freq_table argument
> Individual patches must not break kernel compilation, but compilation
> breaks after the first patch itself in your series as you have not
> updated all the users.
>
> Merge all three into a single patch.
>
Got it. I wasn’t sure if core and driver changes should be split, but 
yes, merging them into a single patch is better.