* [PATCH] cpufreq: cppc: simplify default delay_us setting
@ 2021-03-13 2:50 Tom Saeger
2021-03-15 4:53 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Tom Saeger @ 2021-03-13 2:50 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, Prashanth Prakash, linux-pm
Cc: Tom Saeger, linux-kernel
Simplify case when setting default in cppc_cpufreq_get_transition_delay_us.
Signed-off-by: Tom Saeger <tom.saeger@oracle.com>
---
drivers/cpufreq/cppc_cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 8a482c434ea6..2f769b1630c5 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -216,26 +216,16 @@ static unsigned int cppc_cpufreq_get_transition_delay_us(unsigned int cpu)
{
unsigned long implementor = read_cpuid_implementor();
unsigned long part_num = read_cpuid_part_number();
- unsigned int delay_us = 0;
switch (implementor) {
case ARM_CPU_IMP_QCOM:
switch (part_num) {
case QCOM_CPU_PART_FALKOR_V1:
case QCOM_CPU_PART_FALKOR:
- delay_us = 10000;
- break;
- default:
- delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
- break;
+ return 10000;
}
- break;
- default:
- delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
- break;
}
-
- return delay_us;
+ return cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
}
#else
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: cppc: simplify default delay_us setting
2021-03-13 2:50 [PATCH] cpufreq: cppc: simplify default delay_us setting Tom Saeger
@ 2021-03-15 4:53 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2021-03-15 4:53 UTC (permalink / raw)
To: Tom Saeger; +Cc: Rafael J. Wysocki, Prashanth Prakash, linux-pm, linux-kernel
On 12-03-21, 19:50, Tom Saeger wrote:
> Simplify case when setting default in cppc_cpufreq_get_transition_delay_us.
>
> Signed-off-by: Tom Saeger <tom.saeger@oracle.com>
> ---
> drivers/cpufreq/cppc_cpufreq.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
> index 8a482c434ea6..2f769b1630c5 100644
> --- a/drivers/cpufreq/cppc_cpufreq.c
> +++ b/drivers/cpufreq/cppc_cpufreq.c
> @@ -216,26 +216,16 @@ static unsigned int cppc_cpufreq_get_transition_delay_us(unsigned int cpu)
> {
> unsigned long implementor = read_cpuid_implementor();
> unsigned long part_num = read_cpuid_part_number();
> - unsigned int delay_us = 0;
>
> switch (implementor) {
> case ARM_CPU_IMP_QCOM:
> switch (part_num) {
> case QCOM_CPU_PART_FALKOR_V1:
> case QCOM_CPU_PART_FALKOR:
> - delay_us = 10000;
> - break;
> - default:
> - delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
> - break;
> + return 10000;
> }
> - break;
> - default:
> - delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
> - break;
> }
> -
> - return delay_us;
> + return cppc_get_transition_latency(cpu) / NSEC_PER_USEC;
> }
Applied. Thanks.
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-15 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 2:50 [PATCH] cpufreq: cppc: simplify default delay_us setting Tom Saeger
2021-03-15 4:53 ` 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).