public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Simplify switch () in cpufreq_cpu_callback()
@ 2016-04-07  1:30 Rafael J. Wysocki
  2016-04-07  4:28 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-04-07  1:30 UTC (permalink / raw)
  To: Linux PM list
  Cc: Viresh Kumar, Linux Kernel Mailing List, Srinivas Pandruvada

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Merge two switch entries that do the same thing in
cpufreq_cpu_callback().

No functional changes.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/cpufreq/cpufreq.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -2312,16 +2312,13 @@ static int cpufreq_cpu_callback(struct n
 
 	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_ONLINE:
+	case CPU_DOWN_FAILED:
 		cpufreq_online(cpu);
 		break;
 
 	case CPU_DOWN_PREPARE:
 		cpufreq_offline(cpu);
 		break;
-
-	case CPU_DOWN_FAILED:
-		cpufreq_online(cpu);
-		break;
 	}
 	return NOTIFY_OK;
 }

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

* Re: [PATCH] cpufreq: Simplify switch () in cpufreq_cpu_callback()
  2016-04-07  1:30 [PATCH] cpufreq: Simplify switch () in cpufreq_cpu_callback() Rafael J. Wysocki
@ 2016-04-07  4:28 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2016-04-07  4:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM list, Linux Kernel Mailing List, Srinivas Pandruvada

On 07-04-16, 03:30, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Merge two switch entries that do the same thing in
> cpufreq_cpu_callback().
> 
> No functional changes.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/cpufreq/cpufreq.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -2312,16 +2312,13 @@ static int cpufreq_cpu_callback(struct n
>  
>  	switch (action & ~CPU_TASKS_FROZEN) {
>  	case CPU_ONLINE:
> +	case CPU_DOWN_FAILED:
>  		cpufreq_online(cpu);
>  		break;
>  
>  	case CPU_DOWN_PREPARE:
>  		cpufreq_offline(cpu);
>  		break;
> -
> -	case CPU_DOWN_FAILED:
> -		cpufreq_online(cpu);
> -		break;
>  	}
>  	return NOTIFY_OK;
>  }

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

end of thread, other threads:[~2016-04-07  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07  1:30 [PATCH] cpufreq: Simplify switch () in cpufreq_cpu_callback() Rafael J. Wysocki
2016-04-07  4:28 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox