summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-10-05 15:05:23 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-05 22:19:08 +0000
commitba5ae875ad7d8c6bfcde816fb1fff89da99275d0 (patch)
tree1abde0e2b76e709a1f32affa325865eb231d8339
parent9a667209265cfc7f1ec1e318607f59a3449644f6 (diff)
downloadchrome-ec-ba5ae875ad7d8c6bfcde816fb1fff89da99275d0.tar.gz
power: Remove param to power_common_state
Instead of passing the static var state to power_common_state(), just use the static var directly. This should make no change in the live code, but will allow tests to call power_set_state() while the chipset_task is blocked waiting for events. BRANCH=None BUG=b:236074354 TEST=CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I3a59f1e3008bf23a88d2b07d26c2ebd9720588a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3936945 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--power/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/power/common.c b/power/common.c
index 24b9f314f4..c1675d31f2 100644
--- a/power/common.c
+++ b/power/common.c
@@ -432,7 +432,7 @@ board_system_is_idle(uint64_t last_shutdown_time, uint64_t *target,
* @param state Current power state
* @return Updated power state
*/
-static enum power_state power_common_state(enum power_state state)
+static enum power_state power_common_state(void)
{
switch (state) {
case POWER_G3:
@@ -673,7 +673,7 @@ void test_power_common_state(void)
enum power_state new_state;
task_wake(task_get_current());
- new_state = power_common_state(state);
+ new_state = power_common_state();
if (new_state != state)
power_set_state(new_state);
}
@@ -714,7 +714,7 @@ void chipset_task(void *u)
* handler.
*/
if (new_state == state)
- new_state = power_common_state(state);
+ new_state = power_common_state();
/* Handle state changes */
if (new_state != state) {