Change in osmo-bsc[master]: handover_decision_2.c: drop redundant debug_candidate() args

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Oct 12 06:26:11 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11319 )

Change subject: handover_decision_2.c: drop redundant debug_candidate() args
......................................................................

handover_decision_2.c: drop redundant debug_candidate() args

No functional change.

Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 14 insertions(+), 12 deletions(-)

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



diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index 67ba26d..64fc2dd 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -700,9 +700,11 @@
 }
 
 /* verbosely log about a handover candidate */
-static inline void debug_candidate(struct gsm_lchan *lchan, struct ho_candidate *candidate,
-	struct gsm_bts *neighbor, int8_t rxlev, int tchf_count, int tchh_count)
+static inline void debug_candidate(struct ho_candidate *candidate,
+				   int8_t rxlev, int tchf_count, int tchh_count)
 {
+	struct gsm_lchan *lchan = candidate->lchan;
+
 #define HO_CANDIDATE_FMT(tchx, TCHX) "TCH/" #TCHX "={free %d (want %d), [%s%s%s]%s}"
 #define HO_CANDIDATE_ARGS(tchx, TCHX) \
 	     tch##tchx##_count, ho_get_hodec2_tch##tchx##_min_slots(candidate->bts->ho), \
@@ -718,18 +720,18 @@
 		  /* now has to be candidate->requirements & REQUIREMENT_C_TCHX != 0: */ \
 		  " less-or-equal congestion"))
 
-	if (neighbor)
-		LOGPHOLCHANTOBTS(lchan, neighbor, LOGL_DEBUG,
-		     "RX level %d -> %d; "
-		     HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
-		     rxlev2dbm(rxlev), rxlev2dbm(candidate->avg),
-		     HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
-	else
-		LOGPHOLCHANTOBTS(lchan, lchan->ts->trx->bts, LOGL_DEBUG,
+	if (candidate->bts == lchan->ts->trx->bts)
+		LOGPHOLCHANTOBTS(lchan, candidate->bts, LOGL_DEBUG,
 		     "RX level %d; "
 		     HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
 		     rxlev2dbm(candidate->avg),
 		     HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
+	else if (candidate->bts)
+		LOGPHOLCHANTOBTS(lchan, candidate->bts, LOGL_DEBUG,
+		     "RX level %d -> %d; "
+		     HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
+		     rxlev2dbm(rxlev), rxlev2dbm(candidate->avg),
+		     HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
 }
 
 /* add candidate for re-assignment within the current cell */
@@ -748,7 +750,7 @@
 	c->bts = bts;
 	c->requirements = check_requirements(lchan, bts, tchf_count, tchh_count);
 	c->avg = av_rxlev;
-	debug_candidate(lchan, c, NULL, 0, tchf_count, tchh_count);
+	debug_candidate(c, 0, tchf_count, tchh_count);
 	(*candidates)++;
 }
 
@@ -844,7 +846,7 @@
 	tchh_count = bts_count_free_ts(neighbor_bts, GSM_PCHAN_TCH_H);
 	c.requirements = check_requirements(lchan, neighbor_bts, tchf_count, tchh_count);
 
-	debug_candidate(lchan, &c, neighbor_bts, av_rxlev, tchf_count, tchh_count);
+	debug_candidate(&c, av_rxlev, tchf_count, tchh_count);
 
 	clist[*candidates] = c;
 	(*candidates)++;

-- 
To view, visit https://gerrit.osmocom.org/11319
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
Gerrit-Change-Number: 11319
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181012/fec0d757/attachment.htm>


More information about the gerrit-log mailing list