[S] Change in osmocom-bb[master]: trxcon/l1sched: cosmetic: rename l1sched_find_lchan()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32302 ) Change subject: trxcon/l1sched: cosmetic: rename l1sched_find_lchan() ...................................................................... trxcon/l1sched: cosmetic: rename l1sched_find_lchan() An upcoming patch will add a similar function taking chan_nr/link_id as the search criteria, so let's clarify the existing API first. Change-Id: Ib9f733c22d7fc6bd933219906ca680f246b07f4b Related: OS#5500 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/src/sched_trx.c 2 files changed, 23 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/32302/1 diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h index f9894a1..7f7e96d 100644 --- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h @@ -436,8 +436,8 @@ uint8_t codecs_bitmask, uint8_t start_codec); int l1sched_activate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan); int l1sched_deactivate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan); -struct l1sched_lchan_state *l1sched_find_lchan(struct l1sched_ts *ts, - enum l1sched_lchan_type chan); +struct l1sched_lchan_state *l1sched_find_lchan_by_type(struct l1sched_ts *ts, + enum l1sched_lchan_type type); /* Primitive management functions */ struct l1sched_ts_prim *l1sched_prim_push(struct l1sched_state *sched, diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index be4331b..49dadd2 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -115,7 +115,7 @@ return; /* Make sure that lchan is allocated and active */ - lchan = l1sched_find_lchan(ts, chan); + lchan = l1sched_find_lchan_by_type(ts, chan); if (lchan == NULL || !lchan->active) return; @@ -413,13 +413,13 @@ return 0; } -struct l1sched_lchan_state *l1sched_find_lchan(struct l1sched_ts *ts, - enum l1sched_lchan_type chan) +struct l1sched_lchan_state *l1sched_find_lchan_by_type(struct l1sched_ts *ts, + enum l1sched_lchan_type type) { struct l1sched_lchan_state *lchan; llist_for_each_entry(lchan, &ts->lchans, list) - if (lchan->type == chan) + if (lchan->type == type) return lchan; return NULL; @@ -485,7 +485,7 @@ struct l1sched_lchan_state *lchan; /* Try to find requested logical channel */ - lchan = l1sched_find_lchan(ts, chan); + lchan = l1sched_find_lchan_by_type(ts, chan); if (lchan == NULL) return -EINVAL; @@ -572,7 +572,7 @@ struct l1sched_lchan_state *lchan; /* Try to find requested logical channel */ - lchan = l1sched_find_lchan(ts, chan); + lchan = l1sched_find_lchan_by_type(ts, chan); if (lchan == NULL) return -EINVAL; @@ -794,7 +794,7 @@ return -ENODEV; /* Find required channel state */ - lchan = l1sched_find_lchan(ts, chan); + lchan = l1sched_find_lchan_by_type(ts, chan); if (lchan == NULL) return -ENODEV; @@ -851,7 +851,7 @@ return -ENODEV; /* Find the appropriate logical channel */ - lchan = l1sched_find_lchan(ts, frame->dl_chan); + lchan = l1sched_find_lchan_by_type(ts, frame->dl_chan); if (lchan == NULL) return -ENODEV; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ib9f733c22d7fc6bd933219906ca680f246b07f4b Gerrit-Change-Number: 32302 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria