fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/28664 )
Change subject: trxcon: cosmetic: use ARRAY_SIZE() whenever appropriate
......................................................................
trxcon: cosmetic: use ARRAY_SIZE() whenever appropriate
Change-Id: I2a246bad8d11ed45fbf849de961713ab96907d83
---
M src/host/trxcon/src/l1ctl.c
M src/host/trxcon/src/sched_trx.c
2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/64/28664/1
diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index fb8a203..ef88cd9 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -765,7 +765,7 @@
"(tch_mode=%u, audio_mode=%u)\n", req->tch_mode, req->audio_mode);
/* Iterate over timeslot list */
- for (i = 0; i < TRX_TS_COUNT; i++) {
+ for (i = 0; i < ARRAY_SIZE(l1l->sched->ts); i++) {
/* Timeslot is not allocated */
ts = l1l->sched->ts[i];
if (ts == NULL)
diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c
index 556ebcc..964c72f 100644
--- a/src/host/trxcon/src/sched_trx.c
+++ b/src/host/trxcon/src/sched_trx.c
@@ -69,7 +69,7 @@
sched->fn_counter_advance);
/* Iterate over timeslot list */
- for (i = 0; i < TRX_TS_COUNT; i++) {
+ for (i = 0; i < ARRAY_SIZE(br); i++) {
/* Initialize the buffer for this timeslot */
br[i] = (struct l1sched_burst_req) {
.fn = fn,
@@ -179,7 +179,7 @@
LOGP(DSCH, LOGL_NOTICE, "Shutdown scheduler\n");
/* Free all potentially allocated timeslots */
- for (i = 0; i < TRX_TS_COUNT; i++)
+ for (i = 0; i < ARRAY_SIZE(sched->ts); i++)
l1sched_del_ts(sched, i);
l1sched_clck_reset(sched);
@@ -197,7 +197,7 @@
reset_clock ? "and clock counter" : "");
/* Free all potentially allocated timeslots */
- for (i = 0; i < TRX_TS_COUNT; i++)
+ for (i = 0; i < ARRAY_SIZE(sched->ts); i++)
l1sched_del_ts(sched, i);
/* Stop and reset clock counter if required */
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/28664
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2a246bad8d11ed45fbf849de961713ab96907d83
Gerrit-Change-Number: 28664
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange