public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Viresh Kumar <viresh.kumar@linaro•org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel•com>
Subject: linux-next: manual merge of the driver-core tree with Linus' tree
Date: Fri, 7 Aug 2015 15:26:55 +1000	[thread overview]
Message-ID: <20150807152655.27e0e47b@canb.auug.org.au> (raw)

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)

             reply	other threads:[~2015-08-07  5:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  5:26 Stephen Rothwell [this message]
2015-08-07  5:30 ` linux-next: manual merge of the driver-core tree with Linus' tree Viresh Kumar
  -- strict thread matches above, loose matches on Subject: below --
2025-12-05  3:20 Stephen Rothwell
2025-12-05  3:26 ` Miguel Ojeda
2025-12-05  4:01 ` Stephen Rothwell
2014-12-15  3:09 Stephen Rothwell
2013-01-23  4:15 Stephen Rothwell
2013-01-23  4:42 ` Greg KH
2012-05-01  5:01 Stephen Rothwell
2012-05-01 13:46 ` Greg KH
2012-05-04 23:19 ` Greg KH
2012-01-30  2:24 Stephen Rothwell
2012-01-30  2:35 ` Greg KH
2012-02-02 19:26   ` Greg KH
2011-12-28  5:28 Stephen Rothwell
2012-01-04 23:08 ` Greg KH
2010-01-18  7:49 Stephen Rothwell
2010-01-19 20:59 ` Greg KH
2010-01-19 23:43   ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150807152655.27e0e47b@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=greg@kroah$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rafael.j.wysocki@intel$(echo .)com \
    --cc=viresh.kumar@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox