linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: acpi: policy->driver_data can't be NULL in ->exit()
Date: Wed, 30 Mar 2016 16:51:04 +0530	[thread overview]
Message-ID: <20160330112104.GF24343@vireshk-i7> (raw)
In-Reply-To: <CAJZ5v0hqrUyi2ggsDyOq9y0Q9BzktYdSG6DZQMfMF9HsqRLf0g@mail.gmail.com>

On 30-03-16, 13:15, Rafael J. Wysocki wrote:
> On Wed, Mar 30, 2016 at 6:24 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Its always set by ->init() and so it will always be there in ->exit().
> > There is no need to have a special check for just that.
> 
> I'm not sure what happens if there are two (or more) CPUs in the policy, though.
> 
> That case is almost certainly handled incorrectly here (or rather not
> handled at all), but it may just happen to sort of work, because the
> first exiting CPU will clear driver_data and the second one will
> notice that it is NULL now.  Of course, that still is racy with
> respect to governors etc, but I'd rather fix the driver properly.

Sorry, I probably didn't understood your comments properly.

But, the core will call ->exit() only for the last exiting CPU. So,
driver_data will never be NULL.

-- 
viresh

      parent reply	other threads:[~2016-03-30 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30  4:24 [PATCH] cpufreq: acpi: policy->driver_data can't be NULL in ->exit() Viresh Kumar
2016-03-30 11:15 ` Rafael J. Wysocki
2016-03-30 11:18   ` Rafael J. Wysocki
2016-03-30 11:23     ` Viresh Kumar
2016-04-01  8:22     ` Viresh Kumar
2016-04-01 21:00       ` Rafael J. Wysocki
2016-03-30 11:21   ` Viresh Kumar [this message]

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=20160330112104.GF24343@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).