Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-24 Thread Rafael J. Wysocki
On Friday, July 24, 2015 07:49:16 AM Viresh Kumar wrote: > On 23-07-15, 22:56, Rafael J. Wysocki wrote: > > > > + if (policy && policy->kobj_cpu != cpu) { > > > > > > Why are you comparing cpu against kobj_cpu ? I don't think it can ever > > > be false. > > So what I meant was that the

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-24 Thread Rafael J. Wysocki
On Friday, July 24, 2015 07:49:16 AM Viresh Kumar wrote: On 23-07-15, 22:56, Rafael J. Wysocki wrote: + if (policy policy-kobj_cpu != cpu) { Why are you comparing cpu against kobj_cpu ? I don't think it can ever be false. So what I meant was that the expression

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Viresh Kumar
On 23-07-15, 22:56, Rafael J. Wysocki wrote: > > > + if (policy && policy->kobj_cpu != cpu) { > > > > Why are you comparing cpu against kobj_cpu ? I don't think it can ever > > be false. So what I meant was that the expression 'policy->kobj_cpu != cpu' will never return 'false'. Because

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Rafael J. Wysocki
On Thursday, July 23, 2015 12:09:42 PM Viresh Kumar wrote: > On 23-07-15, 02:04, Rafael J. Wysocki wrote: > > +static int cpufreq_add_dev(struct device *dev, struct subsys_interface > > *sif) > > +{ > > + unsigned int cpu = dev->id; > > + struct cpufreq_policy *policy =

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Viresh Kumar
On 23-07-15, 02:04, Rafael J. Wysocki wrote: > +static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) > +{ > + unsigned int cpu = dev->id; > + struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu); > + > + pr_debug("%s: adding CPU %u\n", __func__, cpu);

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Viresh Kumar
On 23-07-15, 22:56, Rafael J. Wysocki wrote: + if (policy policy-kobj_cpu != cpu) { Why are you comparing cpu against kobj_cpu ? I don't think it can ever be false. So what I meant was that the expression 'policy-kobj_cpu != cpu' will never return 'false'. Because policy-kobj_cpu is

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Rafael J. Wysocki
On Thursday, July 23, 2015 12:09:42 PM Viresh Kumar wrote: On 23-07-15, 02:04, Rafael J. Wysocki wrote: +static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) +{ + unsigned int cpu = dev-id; + struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu);

Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-23 Thread Viresh Kumar
On 23-07-15, 02:04, Rafael J. Wysocki wrote: +static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) +{ + unsigned int cpu = dev-id; + struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu); + + pr_debug(%s: adding CPU %u\n, __func__, cpu); + +

[PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-22 Thread Rafael J. Wysocki
From: Rafael J. Wysocki To separate the CPU online interface from the CPU device removal one, split cpufreq_dev_online() out of cpufreq_add_dev() and make cpufreq_cpu_callback() call the former, while the latter will only be used as the CPU device removal subsystem interface callback.

[PATCH 2/2] cpufreq: Separate CPU device removal from CPU online

2015-07-22 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com To separate the CPU online interface from the CPU device removal one, split cpufreq_dev_online() out of cpufreq_add_dev() and make cpufreq_cpu_callback() call the former, while the latter will only be used as the CPU device removal subsystem