Change in osmocom-bb[master]: trxcon/l1ctl.c: drop meaningless 'tn > 7' checks

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

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Thu Sep 6 09:33:01 UTC 2018


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/10776 )

Change subject: trxcon/l1ctl.c: drop meaningless 'tn > 7' checks
......................................................................

trxcon/l1ctl.c: drop meaningless 'tn > 7' checks

There is no need to check the range of timeslot number, which is
decoded from GSM 08.58 channel number (9.3.1) by applying 0x07
mask, because any result of this operation is always within
the correct range.

Change-Id: Ib84417099d303bd3ae3557f48a5c40b812c6cdfc
---
M src/host/trxcon/l1ctl.c
1 file changed, 0 insertions(+), 10 deletions(-)

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



diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 74400be..ec8b4c7 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -565,11 +565,6 @@
 
 	/* Determine TS index */
 	tn = chan_nr & 0x7;
-	if (tn > 7) {
-		LOGP(DL1C, LOGL_ERROR, "Incorrect TS index %u\n", tn);
-		rc = -EINVAL;
-		goto exit;
-	}
 
 	/* Configure requested TS */
 	rc = sched_trx_configure_ts(l1l->trx, tn, config);
@@ -732,11 +727,6 @@
 
 	/* Determine TS index */
 	tn = ul->chan_nr & 0x7;
-	if (tn > 7) {
-		LOGP(DL1C, LOGL_ERROR, "Incorrect TS index %u\n", tn);
-		rc = -EINVAL;
-		goto exit;
-	}
 
 	/* Make sure that required TS is allocated and configured */
 	ts = l1l->trx->ts_list[tn];

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib84417099d303bd3ae3557f48a5c40b812c6cdfc
Gerrit-Change-Number: 10776
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180906/2ecbba78/attachment.htm>


More information about the gerrit-log mailing list