Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202297 > unrolled thread

linux-next: manual merge of the driver-core tree with Linus' tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2015-08-07 07:30 +0200
Last post2015-08-07 07:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: manual merge of the driver-core tree with Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-08-07 07:30 +0200
    Re: linux-next: manual merge of the driver-core tree with Linus' tree Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 07:40 +0200

#1202297 — linux-next: manual merge of the driver-core tree with Linus' tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2015-08-07 07:30 +0200
Subjectlinux-next: manual merge of the driver-core tree with Linus' tree
Message-ID<pUIoa-6BT-7@gated-at.bofh.it>
Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in:

  drivers/cpufreq/cpufreq.c

between commit:

  559ed40752dc ("cpufreq: Avoid attempts to create duplicate symbolic links")

from Linus' tree and commit:

  71db87ba5700 ("bus: subsys: update return type of ->remove_dev() to void")

from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/cpufreq/cpufreq.c
index 76a26609d96b,6da25c10bdfd..000000000000
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@@ -1464,44 -1518,43 +1464,42 @@@ static void cpufreq_offline_finish(unsi
   *
   * Removes the cpufreq interface for a CPU device.
   */
- static int cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
+ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
  {
  	unsigned int cpu = dev->id;
 -	int ret;
 -
 -	/*
 -	 * Only possible if 'cpu' is getting physically removed now. A hotplug
 -	 * notifier should have already been called and we just need to remove
 -	 * link or free policy here.
 -	 */
 -	if (cpu_is_offline(cpu)) {
 -		struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu);
 -		struct cpumask mask;
 +	struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu);
  
 -		if (!policy)
 -			return;
 +	if (!policy)
- 		return 0;
++		return;
  
 -		cpumask_copy(&mask, policy->related_cpus);
 -		cpumask_clear_cpu(cpu, &mask);
 +	if (cpu_online(cpu)) {
 +		cpufreq_offline_prepare(cpu);
 +		cpufreq_offline_finish(cpu);
 +	}
  
 -		/*
 -		 * Free policy only if all policy->related_cpus are removed
 -		 * physically.
 -		 */
 -		if (cpumask_intersects(&mask, cpu_present_mask)) {
 -			remove_cpu_dev_symlink(policy, cpu);
 -			return;
 -		}
 +	cpumask_clear_cpu(cpu, policy->real_cpus);
  
 +	if (cpumask_empty(policy->real_cpus)) {
  		cpufreq_policy_free(policy, true);
- 		return 0;
+ 		return;
  	}
  
 -	ret = __cpufreq_remove_dev_prepare(dev, sif);
 +	if (cpu != policy->kobj_cpu) {
 +		remove_cpu_dev_symlink(policy, cpu);
 +	} else {
 +		/*
 +		 * The CPU owning the policy object is going away.  Move it to
 +		 * another suitable CPU.
 +		 */
 +		unsigned int new_cpu = cpumask_first(policy->real_cpus);
 +		struct device *new_dev = get_cpu_device(new_cpu);
  
 -	if (!ret)
 -		__cpufreq_remove_dev_finish(dev, sif);
 +		dev_dbg(dev, "%s: Moving policy object to CPU%u\n", __func__, new_cpu);
 +
 +		sysfs_remove_link(&new_dev->kobj, "cpufreq");
 +		policy->kobj_cpu = new_cpu;
 +		WARN_ON(kobject_move(&policy->kobj, &new_dev->kobj));
 +	}
- 
- 	return 0;
  }
  
  static void handle_update(struct work_struct *work)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1202300

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-07 07:40 +0200
Message-ID<pUIxP-6MV-11@gated-at.bofh.it>
In reply to#1202297
On 07-08-15, 15:26, Stephen Rothwell wrote:
> Hi Greg,
> 
> Today's linux-next merge of the driver-core tree got a conflict in:
> 
>   drivers/cpufreq/cpufreq.c
> 
> between commit:
> 
>   559ed40752dc ("cpufreq: Avoid attempts to create duplicate symbolic links")
> 
> from Linus' tree and commit:
> 
>   71db87ba5700 ("bus: subsys: update return type of ->remove_dev() to void")
> 
> from the driver-core tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

Looks fine. Thanks.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web