Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417962 > unrolled thread
| Started by | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| First post | 2016-06-09 01:50 +0200 |
| Last post | 2016-06-10 05:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] cpufreq: governor: Drop gov_cancel_work() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-09 01:50 +0200
Re: [PATCH] cpufreq: governor: Drop gov_cancel_work() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-09 05:30 +0200
Re: [PATCH] cpufreq: governor: Drop gov_cancel_work() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-09 14:30 +0200
Re: [PATCH] cpufreq: governor: Drop gov_cancel_work() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-10 05:00 +0200
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-06-09 01:50 +0200 |
| Subject | [PATCH] cpufreq: governor: Drop gov_cancel_work() |
| Message-ID | <rHVou-6Nf-11@gated-at.bofh.it> |
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
There's no reason for gov_cancel_work() to exist at all, as it only
has one caller and the only thing done by that caller is to invoke
gov_cancel_work().
Accordingly, drop gov_cancel_work() and move its contents to the
caller.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/cpufreq_governor.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
+++ linux-pm/drivers/cpufreq/cpufreq_governor.c
@@ -336,17 +336,6 @@ static inline void gov_clear_update_util
synchronize_sched();
}
-static void gov_cancel_work(struct cpufreq_policy *policy)
-{
- struct policy_dbs_info *policy_dbs = policy->governor_data;
-
- gov_clear_update_util(policy_dbs->policy);
- irq_work_sync(&policy_dbs->irq_work);
- cancel_work_sync(&policy_dbs->work);
- atomic_set(&policy_dbs->work_count, 0);
- policy_dbs->work_in_progress = false;
-}
-
static struct policy_dbs_info *alloc_policy_dbs_info(struct cpufreq_policy *policy,
struct dbs_governor *gov)
{
@@ -544,7 +533,13 @@ EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_s
void cpufreq_dbs_governor_stop(struct cpufreq_policy *policy)
{
- gov_cancel_work(policy);
+ struct policy_dbs_info *policy_dbs = policy->governor_data;
+
+ gov_clear_update_util(policy_dbs->policy);
+ irq_work_sync(&policy_dbs->irq_work);
+ cancel_work_sync(&policy_dbs->work);
+ atomic_set(&policy_dbs->work_count, 0);
+ policy_dbs->work_in_progress = false;
}
EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_stop);
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-06-09 05:30 +0200 |
| Message-ID | <rHYPn-Ey-7@gated-at.bofh.it> |
| In reply to | #1417962 |
On 09-06-16, 01:45, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > There's no reason for gov_cancel_work() to exist at all, as it only > has one caller and the only thing done by that caller is to invoke > gov_cancel_work(). > > Accordingly, drop gov_cancel_work() and move its contents to the > caller. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > --- > drivers/cpufreq/cpufreq_governor.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) Acked-by: Viresh Kumar <viresh.kumar@linaro.org> I am wondering what happened to your other patches around the governor callbacks and why weren't they applied yet :) -- viresh
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-06-09 14:30 +0200 |
| Message-ID | <rI7fX-6hH-21@gated-at.bofh.it> |
| In reply to | #1418044 |
On Thu, Jun 9, 2016 at 5:21 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > On 09-06-16, 01:45, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> >> There's no reason for gov_cancel_work() to exist at all, as it only >> has one caller and the only thing done by that caller is to invoke >> gov_cancel_work(). >> >> Accordingly, drop gov_cancel_work() and move its contents to the >> caller. >> >> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> --- >> drivers/cpufreq/cpufreq_governor.c | 19 +++++++------------ >> 1 file changed, 7 insertions(+), 12 deletions(-) > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Thanks! > I am wondering what happened to your other patches around the governor callbacks > and why weren't they applied yet :) They are in linux-next now, aren't they?
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-06-10 05:00 +0200 |
| Message-ID | <rIkPT-78W-3@gated-at.bofh.it> |
| In reply to | #1418279 |
On 09-06-16, 14:21, Rafael J. Wysocki wrote: > On Thu, Jun 9, 2016 at 5:21 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > On 09-06-16, 01:45, Rafael J. Wysocki wrote: > >> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > >> > >> There's no reason for gov_cancel_work() to exist at all, as it only > >> has one caller and the only thing done by that caller is to invoke > >> gov_cancel_work(). > >> > >> Accordingly, drop gov_cancel_work() and move its contents to the > >> caller. > >> > >> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > >> --- > >> drivers/cpufreq/cpufreq_governor.c | 19 +++++++------------ > >> 1 file changed, 7 insertions(+), 12 deletions(-) > > > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > Thanks! > > > I am wondering what happened to your other patches around the governor callbacks > > and why weren't they applied yet :) > > They are in linux-next now, aren't they? Yeah, they are in now. -- viresh
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web