cpufreq: intel_pstate: Remove duplicate CPU ID check
Subsystems (2)
PATCH 1/7 cpufreq: intel_pstate: Remove duplicate CPU ID check
We check the CPU ID during driver init. There is no need to do it again per logical CPU initialization.
So, remove the duplicate check.
--- drivers/cpufreq/intel_pstate.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/cpufreq/intel_pstate.c +0 -6
@@ -691,14 +691,8 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);static int intel_pstate_init_cpu (unsigned int cpunum) { - -const struct x86_cpu_id *id;struct cpudata *cpu; - id =x86_match_cpu (intel_pstate_cpu_ids); -if (!id) -return -ENODEV ; - all_cpu_data[cpunum] =kzalloc (sizeof (struct cpudata ),GFP_KERNEL );if (!all_cpu_data[cpunum])return -ENOMEM ;
Signature · 1 line
1.9.3
Quoted 19 lines · Stratos Karafotis
We check the CPU ID during driver init. There is no need to do it again per logical CPU initialization.
So, remove the duplicate check.
Signed-off-by Stratos Karafotis <[email protected]>--- drivers/cpufreq/intel_pstate.c | 6 ------ 1 file changed, 6 deletions(-)drivers/cpufreq/intel_pstate.c +0
-1@@ -691,14 +691,8 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);static int intel_pstate_init_cpu (unsigned int cpunum) { -
drivers/cpufreq/intel_pstate.c MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); · line 698
Quoted 10 lines
drivers/cpufreq/intel_pstate.c +0
-5-const struct x86_cpu_id *id;struct cpudata *cpu; - id =x86_match_cpu (intel_pstate_cpu_ids); -if (!id) -return -ENODEV ; - all_cpu_data[cpunum] =kzalloc (sizeof (struct cpudata ),GFP_KERNEL );if (!all_cpu_data[cpunum])return -ENOMEM ;
Dirk Brandewie
Acked-byQuoted 23 lines · Viresh Kumar
Quoted 22 lines · Stratos Karafotis
We check the CPU ID during driver init. There is no need to do it again per logical CPU initialization.
So, remove the duplicate check.
Signed-off-by Stratos Karafotis <[email protected]>--- drivers/cpufreq/intel_pstate.c | 6 ------ 1 file changed, 6 deletions(-)drivers/cpufreq/intel_pstate.c +0
-2@@ -691,14 +691,8 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);static int intel_pstate_init_cpu (unsigned int cpunum) { - -const struct x86_cpu_id *id;struct cpudata *cpu;
Quoted 10 lines
drivers/cpufreq/intel_pstate.c MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); · line 698
Quoted 7 lines
drivers/cpufreq/intel_pstate.c +0
-4- id =x86_match_cpu (intel_pstate_cpu_ids); -if (!id) -return -ENODEV ; - all_cpu_data[cpunum] =kzalloc (sizeof (struct cpudata ),GFP_KERNEL );if (!all_cpu_data[cpunum])return -ENOMEM ;Acked-by Viresh Kumar <[email protected]>
Quoted 34 lines · Dirk Brandewie
Quoted 23 lines · Viresh Kumar
Quoted 22 lines · Stratos Karafotis
We check the CPU ID during driver init. There is no need to do it again per logical CPU initialization.
So, remove the duplicate check.
Signed-off-by Stratos Karafotis <[email protected]>--- drivers/cpufreq/intel_pstate.c | 6 ------ 1 file changed, 6 deletions(-)drivers/cpufreq/intel_pstate.c +0
-2@@ -691,14 +691,8 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);static int intel_pstate_init_cpu (unsigned int cpunum) { - -const struct x86_cpu_id *id;struct cpudata *cpu;Quoted 10 lines
drivers/cpufreq/intel_pstate.c MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); · line 698
Quoted 7 lines
drivers/cpufreq/intel_pstate.c +0
-4- id =x86_match_cpu (intel_pstate_cpu_ids); -if (!id) -return -ENODEV ; - all_cpu_data[cpunum] =kzalloc (sizeof (struct cpudata ),GFP_KERNEL );if (!all_cpu_data[cpunum])return -ENOMEM ;Acked-by Viresh Kumar <[email protected]>
Quoted 1 line
Acked-by Dirk Brandewie <[email protected]>
[1/7] applied, please wait with the rest until after 3.16-rc1 is released.
Thanks!
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.