diff mbox

[06/21] cpuidle: rearrange code in __cpuidle_driver_init()

Message ID 72ec40529db737fe0eea6d14fc43fa332f9c5d59.1379779777.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Sept. 22, 2013, 1:20 a.m. UTC
This is trivial patch that just reorders few statements in
__cpuidle_driver_init() routine, so that we don't need both 'continue' and
'break' in the for loop. Functionally it shouldn't change anything.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpuidle/driver.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Daniel Lezcano Sept. 25, 2013, 9:40 p.m. UTC | #1
On 09/22/2013 03:20 AM, Viresh Kumar wrote:
> This is trivial patch that just reorders few statements in
> __cpuidle_driver_init() routine, so that we don't need both 'continue' and
> 'break' in the for loop. Functionally it shouldn't change anything.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpuidle/driver.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
> index 8df66c8..6279e1c 100644
> --- a/drivers/cpuidle/driver.c
> +++ b/drivers/cpuidle/driver.c
> @@ -172,12 +172,10 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
>  	 * order, because usually one of the deeper states have this flag set.
>  	 */
>  	for (i = drv->state_count - 1; i >= 0 ; i--) {
> -
> -		if (!(drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP))
> -			continue;
> -
> -		drv->bctimer = 1;
> -		break;
> +		if (drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP) {
> +			drv->bctimer = 1;
> +			break;
> +		}
>  	}
>  }

Well, I don't have a strong opinion on that, it is "Schtroumpf Vert et
Vert Schtroumpf" :)  [1]

  -- Daniel

[1] http://en.wikipedia.org/wiki/Schtroumpf_Vert_et_Vert_Schtroumpf
Viresh Kumar Sept. 26, 2013, 5:01 a.m. UTC | #2
On 26 September 2013 03:10, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> Well, I don't have a strong opinion on that, it is "Schtroumpf Vert et
> Vert Schtroumpf" :)  [1]

:)
diff mbox

Patch

diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 8df66c8..6279e1c 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -172,12 +172,10 @@  static void __cpuidle_driver_init(struct cpuidle_driver *drv)
 	 * order, because usually one of the deeper states have this flag set.
 	 */
 	for (i = drv->state_count - 1; i >= 0 ; i--) {
-
-		if (!(drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP))
-			continue;
-
-		drv->bctimer = 1;
-		break;
+		if (drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP) {
+			drv->bctimer = 1;
+			break;
+		}
 	}
 }