From: Dirk Brandewie <dirk.brandewie@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Dirk Brandewie <dirk.brandewie@gmail.com>,
cpufreq@vger.kernel.org, Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: BUG in bleeding edge c560f3d
Date: Tue, 05 Feb 2013 10:45:03 -0800 [thread overview]
Message-ID: <5111532F.1060606@gmail.com> (raw)
In-Reply-To: <CAKohpomDLWFP5tTnhTidOOrkEhW_z5Ht_MzbbnzDaq-i+-1aEg@mail.gmail.com>
On 02/04/2013 11:08 PM, Viresh Kumar wrote:
> @Dirk: Please give this one a try. Atleast on my system with various
> configurations, i
> couldn't see any different this patch has made, but is more logical to me.
>
Tested works fine with and without my driver present.
I added it to my patch set with my Tested-by tag it seems gmail decided
to swallow it :-(
Please feel to add my Tested-by:
--Dirk
> commit 9bdd6d47403e696d05953870019e791806f8d6bf
> Author: Viresh Kumar <viresh.kumar@linaro.org>
> Date: Tue Feb 5 12:28:18 2013 +0530
>
> cpufreq: Don't remove sysfs link for policy->cpu
>
> "cpufreq" directory in policy->cpu is never created using
> sysfs_create_link(),
> but using kobject_init_and_add(). And so we shouldn't call
> sysfs_remove_link()
> for policy->cpu(). sysfs stuff for policy->cpu is automatically
> removed when we
> call kobject_put() for dying policy.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cpufreq.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 7aacfbf..9567451 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1047,7 +1047,9 @@ static int __cpufreq_remove_dev(struct device
> *dev, struct subsys_interface *sif
> cpus = cpumask_weight(data->cpus);
> cpumask_clear_cpu(cpu, data->cpus);
>
> - if (unlikely((cpu == data->cpu) && (cpus > 1))) {
> + if (cpu != data->cpu) {
> + sysfs_remove_link(&dev->kobj, "cpufreq");
> + } else if (cpus > 1) {
> /* first sibling now owns the new sysfs dir */
> cpu_dev = get_cpu_device(cpumask_first(data->cpus));
> sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
> @@ -1072,7 +1074,6 @@ static int __cpufreq_remove_dev(struct device
> *dev, struct subsys_interface *sif
> pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
> cpufreq_cpu_put(data);
> unlock_policy_rwsem_write(cpu);
> - sysfs_remove_link(&dev->kobj, "cpufreq");
>
> /* If cpu is last user of policy, free policy */
> if (cpus == 1) {
>
next prev parent reply other threads:[~2013-02-05 18:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 22:19 BUG in bleeding edge c560f3d Dirk Brandewie
2013-02-05 0:09 ` Rafael J. Wysocki
2013-02-05 0:05 ` Dirk Brandewie
2013-02-05 2:43 ` Rafael J. Wysocki
2013-02-05 5:45 ` Viresh Kumar
2013-02-05 7:08 ` Viresh Kumar
2013-02-05 10:08 ` Rafael J. Wysocki
2013-02-05 18:45 ` Dirk Brandewie [this message]
2013-02-05 21:30 ` Rafael J. Wysocki
2013-02-06 1:34 ` Viresh Kumar
2013-02-05 2:47 ` Rafael J. Wysocki
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=5111532F.1060606@gmail.com \
--to=dirk.brandewie@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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