pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29928 )
Change subject: Rename tbf_alloc_ul_tbf -> ul_tbf_alloc ......................................................................
Rename tbf_alloc_ul_tbf -> ul_tbf_alloc
Use proper prefix according to the type being allocated.
Change-Id: Ic98c3c852c96c3f52f1c8f531b8d0fd28ce5aef5 --- M src/gprs_ms.c M src/tbf_ul.cpp M src/tbf_ul.h M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp M tests/types/TypesTest.cpp 6 files changed, 13 insertions(+), 13 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 5bf929e..57d8a19 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -1068,7 +1068,7 @@ const bool single_slot = false; struct gprs_rlcmac_ul_tbf *ul_tbf;
- ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, use_trx, single_slot); + ul_tbf = ul_tbf_alloc(ms->bts, ms, use_trx, single_slot); if (!ul_tbf) { LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n"); /* Caller will most probably send a Imm Ass Reject after return */ @@ -1087,7 +1087,7 @@ const bool single_slot = true; struct gprs_rlcmac_ul_tbf *ul_tbf;
- ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, trx_no, single_slot); + ul_tbf = ul_tbf_alloc(ms->bts, ms, trx_no, single_slot); if (!ul_tbf) { LOGP(DTBF, LOGL_NOTICE, "No PDCH resource for Uplink TBF\n"); /* Caller will most probably send a Imm Ass Reject after return */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 6edf8be..07f562a 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -104,7 +104,7 @@ }
/* Generic function to alloc a UL TBF, later configured to be assigned either over CCCH or PACCH */ -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot) +struct gprs_rlcmac_ul_tbf *ul_tbf_alloc(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot) { struct gprs_rlcmac_ul_tbf *tbf; int rc; diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 0812b9d..014b167 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -132,7 +132,7 @@ #ifdef __cplusplus extern "C" { #endif -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot); +struct gprs_rlcmac_ul_tbf *ul_tbf_alloc(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot); void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf(struct gprs_rlcmac_tbf *tbf); diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 3426f23..e124b64 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -46,7 +46,7 @@ OSMO_ASSERT(ms != NULL);
if (dir == GPRS_RLCMAC_UL_TBF) - return tbf_alloc_ul_tbf(bts, ms, use_trx, single_slot); + return ul_tbf_alloc(bts, ms, use_trx, single_slot); else return dl_tbf_alloc(bts, ms, use_trx, single_slot); } @@ -221,7 +221,7 @@ ms = bts_alloc_ms(bts, ms_class, 0); /* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */ ms_set_timeout(ms, 0); - ul_tbf = tbf_alloc_ul_tbf(bts, ms, -1, true); + ul_tbf = ul_tbf_alloc(bts, ms, -1, true); if (!ul_tbf) return false;
@@ -275,7 +275,7 @@
dump_assignment(dl_tbf, "DL", verbose);
- ul_tbf = tbf_alloc_ul_tbf(bts, ms, ms_current_trx(ms)->trx_no, false); + ul_tbf = ul_tbf_alloc(bts, ms, ms_current_trx(ms)->trx_no, false); if (!ul_tbf) return false;
@@ -318,7 +318,7 @@ ms = bts_alloc_ms(bts, ms_class, 0); /* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */ ms_set_timeout(ms, 0); - ul_tbf = tbf_alloc_ul_tbf(bts, ms, -1, false); + ul_tbf = ul_tbf_alloc(bts, ms, -1, false); if (!ul_tbf) return false;
@@ -475,7 +475,7 @@ case TEST_MODE_UL_AND_DL: if (ms_ul_tbf(old_ms)) tbf_free(ms_ul_tbf(old_ms)); - tbf = tbf_alloc_ul_tbf(bts, old_ms, trx_no, false); + tbf = ul_tbf_alloc(bts, old_ms, trx_no, false); if (tbf == NULL) { OSMO_ASSERT(trx_no != -1 || bts_all_pdch_allocated(bts)); ms_unref(old_ms); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 91d1f07..96fede7 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -131,7 +131,7 @@ OSMO_ASSERT(ms_dl_tbf(ms) == dl_tbf); OSMO_ASSERT(dl_tbf->ms() == ms);
- gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(bts, + gprs_rlcmac_tbf *ul_tbf = ul_tbf_alloc(bts, ms, 0, false); OSMO_ASSERT(ul_tbf != NULL); ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF); diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 6b36d6d..1e714e1 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -687,7 +687,7 @@ bts->trx[0].pdch[4].enable();
GprsMs *ms = bts_alloc_ms(bts, 1, 1); - struct gprs_rlcmac_ul_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, true); + struct gprs_rlcmac_ul_tbf *tbf = ul_tbf_alloc(bts, ms, 0, true); struct crbb_test crbb_test = {0}; bitvec *rbb = NULL; unsigned int rbb_size; @@ -804,7 +804,7 @@ bts->trx[0].pdch[5].enable();
GprsMs *ms = bts_alloc_ms(bts, 1, 0); - struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false); + struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false); static uint8_t res[] = { 0x06, 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */ 0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */ @@ -846,7 +846,7 @@ bts->trx[0].pdch[2].enable();
GprsMs *ms = bts_alloc_ms(bts, 1, 1); - struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false); + struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false); static uint8_t res[] = { 0x06, 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */ 0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.