* [PATCH 0/2] cpufreq: ondemand: Small cleanups
@ 2016-02-16 19:59 Rafael J. Wysocki
2016-02-16 20:00 ` [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly Rafael J. Wysocki
2016-02-16 20:01 ` [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops Rafael J. Wysocki
0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-02-16 19:59 UTC (permalink / raw)
To: Linux PM list; +Cc: Linux Kernel Mailing List, Viresh Kumar
Hi,
Two cleanups for the ondemand governor.
[1/2] rearranges some code to avoid duplication.
[2/2] drops a governor-specific callback that's never used.
Both on top of the linux-next branch of the linux-pm.git tree from today.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly
2016-02-16 19:59 [PATCH 0/2] cpufreq: ondemand: Small cleanups Rafael J. Wysocki
@ 2016-02-16 20:00 ` Rafael J. Wysocki
2016-02-17 5:12 ` Viresh Kumar
2016-02-16 20:01 ` [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops Rafael J. Wysocki
1 sibling, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-02-16 20:00 UTC (permalink / raw)
To: Linux PM list; +Cc: Linux Kernel Mailing List, Viresh Kumar
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Drop some lines of code from od_update() by arranging the statements
in there in a more logical way.
No functional changes.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/cpufreq_ondemand.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_ondemand.c
+++ linux-pm/drivers/cpufreq/cpufreq_ondemand.c
@@ -175,14 +175,11 @@ static void od_update(struct cpufreq_pol
/* No longer fully busy, reset rate_mult */
policy_dbs->rate_mult = 1;
- if (!od_tuners->powersave_bias) {
- __cpufreq_driver_target(policy, freq_next,
- CPUFREQ_RELATION_C);
- return;
- }
+ if (od_tuners->powersave_bias)
+ freq_next = od_ops.powersave_bias_target(policy,
+ freq_next,
+ CPUFREQ_RELATION_L);
- freq_next = od_ops.powersave_bias_target(policy, freq_next,
- CPUFREQ_RELATION_L);
__cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_C);
}
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops
2016-02-16 19:59 [PATCH 0/2] cpufreq: ondemand: Small cleanups Rafael J. Wysocki
2016-02-16 20:00 ` [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly Rafael J. Wysocki
@ 2016-02-16 20:01 ` Rafael J. Wysocki
2016-02-17 5:14 ` Viresh Kumar
1 sibling, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-02-16 20:01 UTC (permalink / raw)
To: Linux PM list; +Cc: Linux Kernel Mailing List, Viresh Kumar
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The ->freq_increase callback in struct od_ops is never invoked,
so drop it.
No functional changes.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/cpufreq_governor.h | 1 -
drivers/cpufreq/cpufreq_ondemand.c | 1 -
2 files changed, 2 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_ondemand.c
+++ linux-pm/drivers/cpufreq/cpufreq_ondemand.c
@@ -417,7 +417,6 @@ define_get_cpu_dbs_routines(od_cpu_dbs_i
static struct od_ops od_ops = {
.powersave_bias_init_cpu = ondemand_powersave_bias_init_cpu,
.powersave_bias_target = generic_powersave_bias_target,
- .freq_increase = dbs_freq_increase,
};
static struct dbs_governor od_dbs_gov = {
Index: linux-pm/drivers/cpufreq/cpufreq_governor.h
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.h
+++ linux-pm/drivers/cpufreq/cpufreq_governor.h
@@ -220,7 +220,6 @@ struct od_ops {
void (*powersave_bias_init_cpu)(int cpu);
unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy,
unsigned int freq_next, unsigned int relation);
- void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq);
};
extern struct mutex dbs_data_mutex;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly
2016-02-16 20:00 ` [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly Rafael J. Wysocki
@ 2016-02-17 5:12 ` Viresh Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2016-02-17 5:12 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM list, Linux Kernel Mailing List
On 16-02-16, 21:00, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Drop some lines of code from od_update() by arranging the statements
> in there in a more logical way.
>
> No functional changes.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq_ondemand.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq_ondemand.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_ondemand.c
> +++ linux-pm/drivers/cpufreq/cpufreq_ondemand.c
> @@ -175,14 +175,11 @@ static void od_update(struct cpufreq_pol
> /* No longer fully busy, reset rate_mult */
> policy_dbs->rate_mult = 1;
>
> - if (!od_tuners->powersave_bias) {
> - __cpufreq_driver_target(policy, freq_next,
> - CPUFREQ_RELATION_C);
> - return;
> - }
> + if (od_tuners->powersave_bias)
> + freq_next = od_ops.powersave_bias_target(policy,
> + freq_next,
> + CPUFREQ_RELATION_L);
>
> - freq_next = od_ops.powersave_bias_target(policy, freq_next,
> - CPUFREQ_RELATION_L);
> __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_C);
> }
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops
2016-02-16 20:01 ` [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops Rafael J. Wysocki
@ 2016-02-17 5:14 ` Viresh Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2016-02-17 5:14 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM list, Linux Kernel Mailing List
On 16-02-16, 21:01, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The ->freq_increase callback in struct od_ops is never invoked,
> so drop it.
>
> No functional changes.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq_governor.h | 1 -
> drivers/cpufreq/cpufreq_ondemand.c | 1 -
> 2 files changed, 2 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq_ondemand.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_ondemand.c
> +++ linux-pm/drivers/cpufreq/cpufreq_ondemand.c
> @@ -417,7 +417,6 @@ define_get_cpu_dbs_routines(od_cpu_dbs_i
> static struct od_ops od_ops = {
> .powersave_bias_init_cpu = ondemand_powersave_bias_init_cpu,
> .powersave_bias_target = generic_powersave_bias_target,
> - .freq_increase = dbs_freq_increase,
> };
>
> static struct dbs_governor od_dbs_gov = {
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.h
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.h
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.h
> @@ -220,7 +220,6 @@ struct od_ops {
> void (*powersave_bias_init_cpu)(int cpu);
> unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy,
> unsigned int freq_next, unsigned int relation);
> - void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq);
> };
>
> extern struct mutex dbs_data_mutex;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-17 5:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 19:59 [PATCH 0/2] cpufreq: ondemand: Small cleanups Rafael J. Wysocki
2016-02-16 20:00 ` [PATCH 1/2] cpufreq: ondemand: Simplify od_update() slightly Rafael J. Wysocki
2016-02-17 5:12 ` Viresh Kumar
2016-02-16 20:01 ` [PATCH 2/2] cpufreq: ondemand: Drop unused callback from struct od_ops Rafael J. Wysocki
2016-02-17 5:14 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).