From 519f8beccf2fee905499d8560113d5075d0be02e Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 6 Feb 2018 18:00:02 +0100 Subject: rename a variable and improve comments Change-Id: I8f14eecd0b7e2e76547804da665cd254628fee2b --- src/libcommon/acc_ramp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcommon/acc_ramp.c b/src/libcommon/acc_ramp.c index 0c96fbf60..20286b505 100644 --- a/src/libcommon/acc_ramp.c +++ b/src/libcommon/acc_ramp.c @@ -86,15 +86,15 @@ static void do_ramping_step(void *data) /* Allow 'step_size' ACCs, starting from ACC0. ACC9 will be allowed last. */ for (i = 0; i < acc_ramp->step_size; i++) { - int c = ffs(acc_ramp->barred_t3); - if (c <= 0) { - c = ffs(acc_ramp->barred_t2); - if (c == 1 || c == 2) /* ACC8 or ACC9 */ - allow_one_acc(acc_ramp, c - 1 + 8); + int idx = ffs(acc_ramp->barred_t3); + if (idx <= 0) { + idx = ffs(acc_ramp->barred_t2); + if (idx == 1 || idx == 2) /* ACC8 or ACC9 is still barred */ + allow_one_acc(acc_ramp, idx - 1 + 8); else break; /* all ACCs are now allowed */ } else - allow_one_acc(acc_ramp, c - 1); /* ACC0-ACC7 */ + allow_one_acc(acc_ramp, idx - 1); /* one of ACC0-ACC7 is still bared */ } /* If we have not allowed all ACCs yet, schedule another ramping step. */ -- cgit v1.2.3