diff mbox series

[-next] cpufreq: remove unnecessary break

Message ID 20201023095839.32218-1-zhangqilong3@huawei.com
State New
Headers show
Series [-next] cpufreq: remove unnecessary break | expand

Commit Message

Zhang Qilong Oct. 23, 2020, 9:58 a.m. UTC
A 'break' is not needed because of previous 'return'

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/cpufreq/e_powersaver.c | 1 -
 drivers/cpufreq/longhaul.c     | 1 -
 2 files changed, 2 deletions(-)

Comments

Viresh Kumar Oct. 23, 2020, 9:49 a.m. UTC | #1
On 23-10-20, 17:58, Zhang Qilong wrote:
> A 'break' is not needed because of previous 'return'

> 

> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>

> ---

>  drivers/cpufreq/e_powersaver.c | 1 -

>  drivers/cpufreq/longhaul.c     | 1 -

>  2 files changed, 2 deletions(-)

> 

> diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c

> index 776a58bab0ff..ab93bce8ae77 100644

> --- a/drivers/cpufreq/e_powersaver.c

> +++ b/drivers/cpufreq/e_powersaver.c

> @@ -223,7 +223,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy)

>  	case EPS_BRAND_C3:

>  		pr_cont("C3\n");

>  		return -ENODEV;

> -		break;

>  	}

>  	/* Enable Enhanced PowerSaver */

>  	rdmsrl(MSR_IA32_MISC_ENABLE, val);

> diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c

> index 123fb006810d..182a4dbca095 100644

> --- a/drivers/cpufreq/longhaul.c

> +++ b/drivers/cpufreq/longhaul.c

> @@ -593,7 +593,6 @@ static void longhaul_setup_voltagescaling(void)

>  		break;

>  	default:

>  		return;

> -		break;

>  	}

>  	if (min_vid_speed >= highest_speed)

>  		return;


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


-- 
viresh
Rafael J. Wysocki Oct. 27, 2020, 5:44 p.m. UTC | #2
On Fri, Oct 23, 2020 at 11:48 AM Zhang Qilong <zhangqilong3@huawei.com> wrote:
>
> A 'break' is not needed because of previous 'return'
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  drivers/cpufreq/e_powersaver.c | 1 -
>  drivers/cpufreq/longhaul.c     | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
> index 776a58bab0ff..ab93bce8ae77 100644
> --- a/drivers/cpufreq/e_powersaver.c
> +++ b/drivers/cpufreq/e_powersaver.c
> @@ -223,7 +223,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
>         case EPS_BRAND_C3:
>                 pr_cont("C3\n");
>                 return -ENODEV;
> -               break;
>         }
>         /* Enable Enhanced PowerSaver */
>         rdmsrl(MSR_IA32_MISC_ENABLE, val);
> diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
> index 123fb006810d..182a4dbca095 100644
> --- a/drivers/cpufreq/longhaul.c
> +++ b/drivers/cpufreq/longhaul.c
> @@ -593,7 +593,6 @@ static void longhaul_setup_voltagescaling(void)
>                 break;
>         default:
>                 return;
> -               break;
>         }
>         if (min_vid_speed >= highest_speed)
>                 return;
> --

Applied as 5.10-rc material with some subject and changelog edits, thanks!
diff mbox series

Patch

diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index 776a58bab0ff..ab93bce8ae77 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -223,7 +223,6 @@  static int eps_cpu_init(struct cpufreq_policy *policy)
 	case EPS_BRAND_C3:
 		pr_cont("C3\n");
 		return -ENODEV;
-		break;
 	}
 	/* Enable Enhanced PowerSaver */
 	rdmsrl(MSR_IA32_MISC_ENABLE, val);
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index 123fb006810d..182a4dbca095 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -593,7 +593,6 @@  static void longhaul_setup_voltagescaling(void)
 		break;
 	default:
 		return;
-		break;
 	}
 	if (min_vid_speed >= highest_speed)
 		return;