pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30215 )

Change subject: tbf_fsm: Move tbf_fsm_state_chg macro to .c file
......................................................................

tbf_fsm: Move tbf_fsm_state_chg macro to .c file

It is nowadays only used internally, hence it can be moved to the .c file
to better describe its scope.

Change-Id: I23cfa5b7efbeb6a58855099780749741c9c947e9
---
M src/tbf_fsm.c
M src/tbf_fsm.h
2 files changed, 9 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  fixeria: Looks good to me, approved



diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c
index 6fe2a7a..c08fb88 100644
--- a/src/tbf_fsm.c
+++ b/src/tbf_fsm.c
@@ -38,6 +38,15 @@
        [TBF_ST_RELEASING] = {},
 };
 
+/* Transition to a state, using the T timer defined in tbf_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_fsm_state_chg(fi, NEXT_STATE) \
+       osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+                                    tbf_fsm_timeouts, \
+                                    the_pcu->T_defs, \
+                                    -1)
+
 const struct value_string tbf_fsm_event_names[] = {
        { TBF_EV_ASSIGN_ADD_CCCH, "ASSIGN_ADD_CCCH" },
        { TBF_EV_ASSIGN_ADD_PACCH, "ASSIGN_ADD_PACCH" },
diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h
index 0acd4e5..c46d86c 100644
--- a/src/tbf_fsm.h
+++ b/src/tbf_fsm.h
@@ -56,14 +56,4 @@
        unsigned int T_release; /* Timer to be used to end release: T3169 or 
T3195 */
 };

-extern const struct osmo_tdef_state_timeout tbf_fsm_timeouts[32];
-/* Transition to a state, using the T timer defined in tbf_fsm_timeouts.
- * The actual timeout value is in turn obtained from conn->T_defs.
- * Assumes local variable fi exists. */
-#define tbf_fsm_state_chg(fi, NEXT_STATE) \
-       osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
-                                    tbf_fsm_timeouts, \
-                                    the_pcu->T_defs, \
-                                    -1)
-
 extern struct osmo_fsm tbf_fsm;

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I23cfa5b7efbeb6a58855099780749741c9c947e9
Gerrit-Change-Number: 30215
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to