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
This commit is contained in:
parent
9ea93c7e20
commit
7593cc743d
|
@ -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,
|
||||
|
|
|
@ -638,6 +638,6 @@ void lchan_rtp_socket_free(struct gsm_lchan *lchan)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -88,19 +88,6 @@ int osmo_in_array(unsigned int search, const unsigned int *arr, unsigned int siz
|
|||
}
|
||||
#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)
|
||||
{
|
||||
|
|
|
@ -659,7 +659,7 @@ static void trx_sched_clean_ts(struct gsm_bts_trx_ts *ts)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue