2014-06-09 21:00:16

by Stratos Karafotis

[permalink] [raw]
Subject: [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.

Signed-off-by: Stratos Karafotis <[email protected]>
---
drivers/cpufreq/intel_pstate.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index aebd457..4e7f492 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -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;
--
1.9.3


2014-06-10 05:21:51

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 1/7] cpufreq: intel_pstate: Remove duplicate CPU ID check

On 10 June 2014 02:30, Stratos Karafotis <[email protected]> wrote:
> 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(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index aebd457..4e7f492 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -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;

Acked-by: Viresh Kumar <[email protected]>

2014-06-10 17:14:34

by Dirk Brandewie

[permalink] [raw]
Subject: Re: [PATCH 1/7] cpufreq: intel_pstate: Remove duplicate CPU ID check

On 06/09/2014 10:21 PM, Viresh Kumar wrote:
> On 10 June 2014 02:30, Stratos Karafotis <[email protected]> wrote:
>> 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(-)
>>
>> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
>> index aebd457..4e7f492 100644
>> --- a/drivers/cpufreq/intel_pstate.c
>> +++ b/drivers/cpufreq/intel_pstate.c
>> @@ -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;
>
> Acked-by: Viresh Kumar <[email protected]>
>
Acked-by: Dirk Brandewie <[email protected]>

2014-06-11 00:15:19

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 1/7] cpufreq: intel_pstate: Remove duplicate CPU ID check

On Tuesday, June 10, 2014 10:14:29 AM Dirk Brandewie wrote:
> On 06/09/2014 10:21 PM, Viresh Kumar wrote:
> > On 10 June 2014 02:30, Stratos Karafotis <[email protected]> wrote:
> >> 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(-)
> >>
> >> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> >> index aebd457..4e7f492 100644
> >> --- a/drivers/cpufreq/intel_pstate.c
> >> +++ b/drivers/cpufreq/intel_pstate.c
> >> @@ -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;
> >
> > Acked-by: Viresh Kumar <[email protected]>
> >
> Acked-by: Dirk Brandewie <[email protected]>

[1/7] applied, please wait with the rest until after 3.16-rc1 is released.

Thanks!

--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.