fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28560 )


Change subject: trxcon: rename l1sched_prim_init() to l1sched_prim_alloc()
......................................................................

trxcon: rename l1sched_prim_init() to l1sched_prim_alloc()

The current function name is confusing, because l1sched_prim_init()
is not only initializing a primitive, but also allocating it on heap.
Let's use '_alloc' instead of '_init' to reflect that.

Change-Id: Ie1bebb6829ba9f640455685fcd7309b6aa442ef0
Related: OS#5599, OS#3761
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h
M src/host/trxcon/src/l1ctl.c
M src/host/trxcon/src/sched_prim.c
3 files changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/60/28560/1

diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h
index d8f51a5..b1eee39 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h
@@ -358,7 +358,7 @@
        enum l1sched_lchan_type chan);

 /* Primitive management functions */
-int l1sched_prim_init(void *ctx, struct l1sched_ts_prim **prim,
+int l1sched_prim_alloc(void *ctx, struct l1sched_ts_prim **prim,
        size_t pl_len, uint8_t chan_nr, uint8_t link_id);
 int l1sched_prim_push(struct trx_instance *trx,
        struct l1sched_ts_prim *prim, uint8_t chan_nr);
diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index 980ac49..0d5bcb9 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -541,7 +541,7 @@
        }

        /* Init a new primitive */
-       rc = l1sched_prim_init(l1l->trx, &prim, len, ul->chan_nr, ul->link_id);
+       rc = l1sched_prim_alloc(l1l->trx, &prim, len, ul->chan_nr, ul->link_id);
        if (rc)
                goto exit;

@@ -724,7 +724,7 @@
                chan_nr, link_id, payload_len);

        /* Init a new primitive */
-       rc = l1sched_prim_init(l1l->trx, &prim, payload_len,
+       rc = l1sched_prim_alloc(l1l->trx, &prim, payload_len,
                chan_nr, link_id);
        if (rc)
                goto exit;
diff --git a/src/host/trxcon/src/sched_prim.c b/src/host/trxcon/src/sched_prim.c
index 64517f5..bf36e7a 100644
--- a/src/host/trxcon/src/sched_prim.c
+++ b/src/host/trxcon/src/sched_prim.c
@@ -44,7 +44,7 @@
  * @param  link_id RSL link description (used to set a proper chan)
  * @return         zero in case of success, otherwise a error number
  */
-int l1sched_prim_init(void *ctx, struct l1sched_ts_prim **prim,
+int l1sched_prim_alloc(void *ctx, struct l1sched_ts_prim **prim,
        size_t pl_len, uint8_t chan_nr, uint8_t link_id)
 {
        enum l1sched_lchan_type lchan_type;
@@ -161,7 +161,7 @@
        };

        /* Allocate a new primitive */
-       rc = l1sched_prim_init(lchan, &prim, GSM_MACBLOCK_LEN,
+       rc = l1sched_prim_alloc(lchan, &prim, GSM_MACBLOCK_LEN,
                l1sched_lchan_desc[lchan->type].chan_nr, L1SCHED_CH_LID_SACCH);
        OSMO_ASSERT(rc == 0);


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28560
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie1bebb6829ba9f640455685fcd7309b6aa442ef0
Gerrit-Change-Number: 28560
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to