pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bts/+/29035 )
Change subject: Use libosmocore API msgb_queue_free() to free lists
......................................................................
Use libosmocore API msgb_queue_free() to free lists
There's no need to maintain a duplicate msgb_queue_flush(), which
returns the amount of freed messages (feature not used at all by the
callers).
Change-Id: I9841e18ca0b7b852130bbb02a510e43a3b3fd93f
---
M include/osmo-bts/rsl.h
M src/common/lchan.c
M src/common/rsl.c
M src/common/scheduler.c
4 files changed, 2 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/35/29035/1
diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index dcd476c..a530734 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -4,8 +4,6 @@
#define LCHAN_FN_DUMMY 0xFFFFFFFF
#define LCHAN_FN_WAIT 0xFFFFFFFE
-int msgb_queue_flush(struct llist_head *list);
-
int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg);
int rsl_tx_rf_res(struct gsm_bts_trx *trx);
int rsl_tx_chan_rqd(struct gsm_bts_trx *trx, struct gsm_time *gtime,
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 83d20da..c7d8d45 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -638,6 +638,6 @@
{
osmo_rtp_socket_free(lchan->abis_ip.rtp_socket);
lchan->abis_ip.rtp_socket = NULL;
- msgb_queue_flush(&lchan->dl_tch_queue);
+ msgb_queue_free(&lchan->dl_tch_queue);
lchan->dl_tch_queue_len = 0;
}
diff --git a/src/common/rsl.c b/src/common/rsl.c
index bcbe27c..8cdb662 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -88,19 +88,6 @@
}
#define OSMO_IN_ARRAY(search, arr) osmo_in_array(search, arr, ARRAY_SIZE(arr))
-int msgb_queue_flush(struct llist_head *list)
-{
- struct msgb *msg, *msg2;
- int count = 0;
-
- llist_for_each_entry_safe(msg, msg2, list, list) {
- msgb_free(msg);
- count++;
- }
-
- return count;
-}
-
/* FIXME: move this to libosmocore */
void gsm48_gen_starting_time(uint8_t *out, struct gsm_time *gtime)
{
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 6564e5a..14aff34 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -659,7 +659,7 @@
struct l1sched_ts *l1ts = ts->priv;
unsigned int i;
- msgb_queue_flush(&l1ts->dl_prims);
+ msgb_queue_free(&l1ts->dl_prims);
rate_ctr_group_free(l1ts->ctrs);
l1ts->ctrs = NULL;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/29035
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I9841e18ca0b7b852130bbb02a510e43a3b3fd93f
Gerrit-Change-Number: 29035
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange