Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244170 > unrolled thread

[PATCH 5/5] cpufreq: Drop redundant check for inactive policies

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-10-11 19:30 +0200
Last post2015-10-13 08:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 5/5] cpufreq: Drop redundant check for inactive policies Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-11 19:30 +0200
    Re: [PATCH 5/5] cpufreq: Drop redundant check for inactive policies Saravana Kannan <skannan@codeaurora.org> - 2015-10-12 21:40 +0200
      Re: [PATCH 5/5] cpufreq: Drop redundant check for inactive policies Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-13 08:10 +0200

#1244170 — [PATCH 5/5] cpufreq: Drop redundant check for inactive policies

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-10-11 19:30 +0200
Subject[PATCH 5/5] cpufreq: Drop redundant check for inactive policies
Message-ID<qisBA-6Ef-19@gated-at.bofh.it>
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>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1245062

FromSaravana Kannan <skannan@codeaurora.org>
Date2015-10-12 21:40 +0200
Message-ID<qiR6W-cl-5@gated-at.bofh.it>
In reply to#1244170
On 10/11/2015 10:21 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>
> ---
>   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();
>

Doesn't really seem related to the sysfs reorg/clean up. Should it be a 
separate patch outside of this series?

Acked-by: Saravana Kannan <skannan@codeaurora.org>

-Saravana

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1245363

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-10-13 08:10 +0200
Message-ID<qj0WC-6gz-1@gated-at.bofh.it>
In reply to#1245062
On 12-10-15, 12:35, Saravana Kannan wrote:
> Doesn't really seem related to the sysfs reorg/clean up. Should it
> be a separate patch outside of this series?

Sent it separately now ..

> Acked-by: Saravana Kannan <skannan@codeaurora.org>

A reviewed-by would have been more appropriate here though.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web