public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Nishanth Menon <nm@ti.com>
Cc: "linux-pm" <linux-pm@lists.linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"linux-arm" <linux-arm-kernel@lists.infradead.org>,
	"linux-omap" <linux-omap@vger.kernel.org>,
	Paul <paulmck@linux.vnet.ibm.com>,
	Kevin H <khilman@deeprootsystems.com>
Subject: Re: [PATCH v5] power: introduce library for device-specific OPPs
Date: Tue, 5 Oct 2010 00:45:27 +0200	[thread overview]
Message-ID: <201010050045.27969.rjw@sisk.pl> (raw)
In-Reply-To: <201010050036.23179.rjw@sisk.pl>

On Tuesday, October 05, 2010, Rafael J. Wysocki wrote:
> On Friday, October 01, 2010, Nishanth Menon wrote:
...
> > +int opp_init_cpufreq_table(struct device *dev,
> > +			    struct cpufreq_frequency_table **table)
> > +{
> > +	struct device_opp *dev_opp;
> > +	struct opp *opp;
> > +	struct cpufreq_frequency_table *freq_table;
> > +	int i = 0;
> > +
> > +	rcu_read_lock();
> 
> I would pretend I'm an updater here and acquire dev_opp_list_lock instead.
> 
> > +	dev_opp = find_device_opp(dev);
> > +	if (IS_ERR(dev_opp)) {
> > +		rcu_read_unlock();
> 
> So that won't be necessary.

Or rather the lock will have to be dropped here instead.

> > +		pr_warning("Unable to find device\n");
> > +		return PTR_ERR(dev_opp);
> > +	}
> > +

Thanks,
Rafael

  reply	other threads:[~2010-10-04 22:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 11:39 [PATCH v5] power: introduce library for device-specific OPPs Nishanth Menon
2010-10-04 22:36 ` Rafael J. Wysocki
2010-10-04 22:45   ` Rafael J. Wysocki [this message]
2010-10-05 13:05   ` Nishanth Menon
2010-10-05 20:44     ` Rafael J. Wysocki
2010-10-05 20:50       ` Kevin Hilman
2010-10-05 21:03         ` Nishanth Menon

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=201010050045.27969.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nm@ti.com \
    --cc=paulmck@linux.vnet.ibm.com \
    /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