From: Jean Pihet <jean.pihet@newoldbits.com>
To: Kevin Hilman <khilman@ti.com>,
Grazvydas Ignotas <notasas@gmail.com>,
linux-omap@vger.kernel.org
Cc: Jean Pihet <j-pihet@ti.com>
Subject: [PATCH 1/3] ARM: OMAP3: PM: cpuidle: default to C1 in next_valid_state
Date: Fri, 1 Jun 2012 17:11:06 +0200 [thread overview]
Message-ID: <1338563468-31403-2-git-send-email-j-pihet@ti.com> (raw)
In-Reply-To: <1338563468-31403-1-git-send-email-j-pihet@ti.com>
If the next state is no found in the next_valid_state function,
fallback to the default value of C1 (which is state 0).
This prevents the use of a bogus state -1 in the rest of the cpuidle
code.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
arch/arm/mach-omap2/cpuidle34xx.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 207bc1c..f619a92 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -178,7 +178,7 @@ static int next_valid_state(struct cpuidle_device *dev,
u32 mpu_deepest_state = PWRDM_POWER_RET;
u32 core_deepest_state = PWRDM_POWER_RET;
int idx;
- int next_index = -1;
+ int next_index = 0; /* C1 is the default value */
if (enable_off_mode) {
mpu_deepest_state = PWRDM_POWER_OFF;
@@ -209,12 +209,6 @@ static int next_valid_state(struct cpuidle_device *dev,
}
}
- /*
- * C1 is always valid.
- * So, no need to check for 'next_index == -1' outside
- * this loop.
- */
-
return next_index;
}
--
1.7.7.6
next prev parent reply other threads:[~2012-06-01 15:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 15:11 [PATCH 0/3] ARM: OMAP3: PM: optimize cpuidle C1 state latency Jean Pihet
2012-06-01 15:11 ` Jean Pihet [this message]
2012-06-01 15:11 ` [PATCH 2/3] ARM: OMAP3: PM: cpuidle: optimize the PER latency in C1 state Jean Pihet
2012-06-01 15:11 ` [PATCH 3/3] ARM: OMAP3: PM: cpuidle: optimize the clkdm idle " Jean Pihet
2012-06-20 8:19 ` Rajendra Nayak
2012-06-20 8:31 ` Jean Pihet
2012-06-20 8:46 ` Rajendra Nayak
2012-06-20 8:52 ` Rajendra Nayak
2012-06-20 8:57 ` Rajendra Nayak
2012-06-20 11:34 ` Jean Pihet
2012-06-28 18:03 ` Kevin Hilman
2012-06-01 16:26 ` [PATCH 0/3] ARM: OMAP3: PM: optimize cpuidle C1 state latency Kevin Hilman
2012-06-01 16:29 ` Jean Pihet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338563468-31403-2-git-send-email-j-pihet@ti.com \
--to=jean.pihet@newoldbits.com \
--cc=j-pihet@ti.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=notasas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox