[MERGED] osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-19 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Cosmetic fixes for power ramping code.
..


Cosmetic fixes for power ramping code.

Fix typos in 2 comments.

Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
---
M src/common/tx_power.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/tx_power.c b/src/common/tx_power.c
index 3dfe1f7..e418cec 100644
--- a/src/common/tx_power.c
+++ b/src/common/tx_power.c
@@ -275,7 +275,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 +283,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: merged
Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-12 Thread Stefan Sperling

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/6287/1/src/common/tx_power.c
File src/common/tx_power.c:

Line 153:   return (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm);
> sorry, I really prefer the more verbose version, I think it is what we do i
Sure, if you prefer that, I don't mind.

Next patch set will leave this bit of code as it is and just fix the comments.


-- 
To view, visit https://gerrit.osmocom.org/6287
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: Yes


[PATCH] osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-12 Thread Stefan Sperling
Hello Vadim Yanitskiy, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/6287

to look at the new patch set (#2).

Cosmetic fixes for power ramping code.

Fix typos in 2 comments.

Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
---
M src/common/tx_power.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/6287/2

diff --git a/src/common/tx_power.c b/src/common/tx_power.c
index 3dfe1f7..e418cec 100644
--- a/src/common/tx_power.c
+++ b/src/common/tx_power.c
@@ -275,7 +275,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 +283,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: newpatchset
Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-06 Thread Harald Welte

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/6287/1/src/common/tx_power.c
File src/common/tx_power.c:

Line 153:   return (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm);
sorry, I really prefer the more verbose version, I think it is what we do in 
Osmocom in other places, too.


-- 
To view, visit https://gerrit.osmocom.org/6287
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: Yes


osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-06 Thread Vadim Yanitskiy

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/6287
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: Cosmetic fixes for power ramping code.

2018-02-06 Thread Stefan Sperling

Review 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 = >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