This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Stefan Sperling gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/6287 Cosmetic fixes for power ramping code. Reduce a logic expression to less lines of code: 'if (foo) return 1; else return 0;' is equivalent to just 'return (foo);' Fix typos in 2 comments. Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 --- M src/common/tx_power.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/6287/1 diff --git a/src/common/tx_power.c b/src/common/tx_power.c index 3dfe1f7..595257d 100644 --- a/src/common/tx_power.c +++ b/src/common/tx_power.c @@ -150,10 +150,7 @@ { struct trx_power_params *tpp = &trx->power_params; - if (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm) - return 1; - else - return 0; + return (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm); } static void power_ramp_do_step(struct gsm_bts_trx *trx, int first); @@ -275,7 +272,7 @@ /* Set attenuation to cause no power change right now */ tpp->ramp.attenuation_mdB = tpp->p_total_tgt_mdBm - tpp->p_total_cur_mdBm; - /* start with the firsrt step */ + /* start with the first step */ power_ramp_do_step(trx, 1); } } else { @@ -283,7 +280,7 @@ * steps until it reaches 0 */ tpp->ramp.attenuation_mdB = tpp->p_total_tgt_mdBm - tpp->p_total_cur_mdBm; - /* start with the firsrt step */ + /* start with the first step */ power_ramp_do_step(trx, 1); } -- To view, visit https://gerrit.osmocom.org/6287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>