All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH Resend] cpufreq: Drop redundant check for inactive policies
@ 2015-10-13  5:27 ` Viresh Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2015-10-13  5:27 UTC (permalink / raw)
  To: Rafael Wysocki; +Cc: linaro-kernel, linux-pm, skannan, Viresh Kumar, open list

We just made sure policy->cpu is online and this check will always fail
as the policy is active. Drop it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Saravana Kannan <skannan@codeaurora.org>
---
Resending as a separate patch.

 drivers/cpufreq/cpufreq.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 58aabe0f2d2c..4fa2215cc6ec 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 
 	down_write(&policy->rwsem);
 
-	/* Updating inactive policies is invalid, so avoid doing that. */
-	if (unlikely(policy_is_inactive(policy))) {
-		ret = -EBUSY;
-		goto unlock_policy_rwsem;
-	}
-
 	if (fattr->store)
 		ret = fattr->store(policy, buf, count);
 	else
 		ret = -EIO;
 
-unlock_policy_rwsem:
 	up_write(&policy->rwsem);
 unlock:
 	put_online_cpus();
-- 
2.4.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH Resend] cpufreq: Drop redundant check for inactive policies
@ 2015-10-13  5:27 ` Viresh Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2015-10-13  5:27 UTC (permalink / raw)
  To: Rafael Wysocki; +Cc: linaro-kernel, linux-pm, skannan, Viresh Kumar, open list

We just made sure policy->cpu is online and this check will always fail
as the policy is active. Drop it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Saravana Kannan <skannan@codeaurora.org>
---
Resending as a separate patch.

 drivers/cpufreq/cpufreq.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 58aabe0f2d2c..4fa2215cc6ec 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 
 	down_write(&policy->rwsem);
 
-	/* Updating inactive policies is invalid, so avoid doing that. */
-	if (unlikely(policy_is_inactive(policy))) {
-		ret = -EBUSY;
-		goto unlock_policy_rwsem;
-	}
-
 	if (fattr->store)
 		ret = fattr->store(policy, buf, count);
 	else
 		ret = -EIO;
 
-unlock_policy_rwsem:
 	up_write(&policy->rwsem);
 unlock:
 	put_online_cpus();
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH Resend] cpufreq: Drop redundant check for inactive policies
  2015-10-13  5:27 ` Viresh Kumar
  (?)
@ 2015-10-15  0:35 ` Rafael J. Wysocki
  2015-10-15  1:51   ` Saravana Kannan
  -1 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2015-10-15  0:35 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: linaro-kernel, linux-pm, skannan, open list

On Tuesday, October 13, 2015 10:57:13 AM Viresh Kumar wrote:
> We just made sure policy->cpu is online and this check will always fail
> as the policy is active. Drop it.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> Acked-by: Saravana Kannan <skannan@codeaurora.org>

Applied, thanks!

Rafael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH Resend] cpufreq: Drop redundant check for inactive policies
  2015-10-15  0:35 ` Rafael J. Wysocki
@ 2015-10-15  1:51   ` Saravana Kannan
  0 siblings, 0 replies; 4+ messages in thread
From: Saravana Kannan @ 2015-10-15  1:51 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Viresh Kumar, linaro-kernel, linux-pm, open list

On 10/14/2015 05:35 PM, Rafael J. Wysocki wrote:
> On Tuesday, October 13, 2015 10:57:13 AM Viresh Kumar wrote:
>> We just made sure policy->cpu is online and this check will always fail
>> as the policy is active. Drop it.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> Acked-by: Saravana Kannan <skannan@codeaurora.org>
>
> Applied, thanks!
>
> Rafael
>

I didn't give a clear ack/review for the series. So, to clarify my 
ack/review

For all patches except 4/5, I'm okay with either/all of this:
Reviewed-by:  Saravana Kannan <skannan@codeaurora.org>
Acked-by: Saravana Kannan <skannan@codeaurora.org>

For 4/5, I would still like us to move the sysfs creating after init. 
That part shouldn't be too hard. We don't need to create the sysfs file 
before init.

Once that's done, I wouldn't mind giving an Ack.

Thanks,
Saravana

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-15  1:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13  5:27 [PATCH Resend] cpufreq: Drop redundant check for inactive policies Viresh Kumar
2015-10-13  5:27 ` Viresh Kumar
2015-10-15  0:35 ` Rafael J. Wysocki
2015-10-15  1:51   ` Saravana Kannan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.