[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iUWHPZB6MGK9znQTYZsNNkPwnSN2dwjQ6KMXzFZ6=xeg@mail.gmail.com>
Date: Wed, 3 Feb 2016 14:38:47 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Rafael Wysocki <rjw@...ysocki.net>,
Juri Lelli <juri.lelli@....com>,
Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Saravana Kannan <skannan@...eaurora.org>,
Peter Zijlstra <peterz@...radead.org>,
Michael Turquette <mturquette@...libre.com>,
Steve Muckle <steve.muckle@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
dietmar.eggemann@....com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops
On Wed, Feb 3, 2016 at 2:21 PM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 03-02-16, 13:42, Rafael J. Wysocki wrote:
>> > +static ssize_t governor_show(struct kobject *kobj, struct attribute *attr,
>> > + char *buf)
>> > +{
>> > + struct dbs_data *dbs_data = to_dbs_data(kobj);
>> > + struct governor_attr *gattr = to_gov_attr(attr);
>> > + int ret = -EIO;
>> > +
>> > + down_read(&dbs_data->rwsem);
>> > +
>> > + if (gattr->show)
>> > + ret = gattr->show(dbs_data, buf);
>> > +
>> > + up_read(&dbs_data->rwsem);
>>
>> Do we need the lock here too?
>>
>> show() is only going to read the value, isn't it? And everything u32
>> or smaller is read atomically anyway.
>
> Okay, will drop it for now.
>
>> Apart from this it looks good to me.
>>
>> When you're ready, please resend the whole series without patch [5/5]
>> which is premature IMO.
>
> I have changed that patch a bit, and am dropping just the lock now and
> not governor_enable thing. That should be sane enough I believe.
In any case this is not suitable for 4.5 IMO.
> Anyway I will be posting 7 patches now, pick only first 4 if you
> aren't confident about the rest.
OK
Thanks,
Rafael
Powered by blists - more mailing lists