pespin submitted this change.
Mark several fsm related internal symbols as static
After some earlier refactoring, those fields are only used internally in
the module, and hence can be marked as static.
Change-Id: Ibf2a6ee5636ae7102ffd13b7497769652bcc3202
---
M src/tbf_dl_ass_fsm.c
M src/tbf_dl_ass_fsm.h
M src/tbf_dl_fsm.c
M src/tbf_fsm.c
M src/tbf_ul_ack_fsm.c
M src/tbf_ul_ack_fsm.h
M src/tbf_ul_ass_fsm.c
M src/tbf_ul_ass_fsm.h
M src/tbf_ul_fsm.c
9 files changed, 37 insertions(+), 49 deletions(-)
diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c
index dec7042..d811b71 100644
--- a/src/tbf_dl_ass_fsm.c
+++ b/src/tbf_dl_ass_fsm.c
@@ -31,13 +31,13 @@
#define X(s) (1 << (s))
-const struct osmo_tdef_state_timeout tbf_dl_ass_fsm_timeouts[32] = {
+static const struct osmo_tdef_state_timeout tbf_dl_ass_fsm_timeouts[32] = {
[TBF_DL_ASS_NONE] = {},
[TBF_DL_ASS_SEND_ASS] = {},
[TBF_DL_ASS_WAIT_ACK] = {},
};
-const struct value_string tbf_dl_ass_fsm_event_names[] = {
+static const struct value_string tbf_dl_ass_fsm_event_names[] = {
{ TBF_DL_ASS_EV_SCHED_ASS, "SCHED_ASS" },
{ TBF_DL_ASS_EV_CREATE_RLCMAC_MSG, "CREATE_RLCMAC_MSG" },
{ TBF_DL_ASS_EV_RX_ASS_CTRL_ACK, "RX_ASS_CTRL_ACK" },
@@ -45,7 +45,16 @@
{ 0, NULL }
};
-struct msgb *create_packet_dl_assign(const struct tbf_dl_ass_fsm_ctx *ctx,
+/* Transition to a state, using the T timer defined in tbf_dl_ass_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_dl_ass_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+ tbf_dl_ass_fsm_timeouts, \
+ the_pcu->T_defs, \
+ -1)
+
+static struct msgb *create_packet_dl_assign(const struct tbf_dl_ass_fsm_ctx *ctx,
const struct tbf_dl_ass_ev_create_rlcmac_msg_ctx *d)
{
struct msgb *msg;
diff --git a/src/tbf_dl_ass_fsm.h b/src/tbf_dl_ass_fsm.h
index b0000ca..cb7be8d 100644
--- a/src/tbf_dl_ass_fsm.h
+++ b/src/tbf_dl_ass_fsm.h
@@ -41,16 +41,6 @@
struct gprs_rlcmac_tbf* tbf; /* back pointer */
};
-extern const struct osmo_tdef_state_timeout tbf_dl_ass_fsm_timeouts[32];
-/* Transition to a state, using the T timer defined in tbf_dl_ass_fsm_timeouts.
- * The actual timeout value is in turn obtained from conn->T_defs.
- * Assumes local variable fi exists. */
-#define tbf_dl_ass_fsm_state_chg(fi, NEXT_STATE) \
- osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
- tbf_dl_ass_fsm_timeouts, \
- the_pcu->T_defs, \
- -1)
-
extern struct osmo_fsm tbf_dl_ass_fsm;
diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c
index 6b455da..a0b1c03 100644
--- a/src/tbf_dl_fsm.c
+++ b/src/tbf_dl_fsm.c
@@ -29,7 +29,7 @@
#define X(s) (1 << (s))
-const struct osmo_tdef_state_timeout tbf_dl_fsm_timeouts[32] = {
+static const struct osmo_tdef_state_timeout tbf_dl_fsm_timeouts[32] = {
[TBF_ST_NEW] = {},
[TBF_ST_ASSIGN] = { },
[TBF_ST_FLOW] = { },
diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c
index 28c04a3..f6dafc3 100644
--- a/src/tbf_fsm.c
+++ b/src/tbf_fsm.c
@@ -21,15 +21,6 @@
/* Note: This file contains shared code for UL/DL TBF FSM. See tbf_dl_fsm.c and
* tbf_ul_fsm.c for the actual implementations of the FSM */
-/* 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_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c
index e2299d4..5e5586b 100644
--- a/src/tbf_ul_ack_fsm.c
+++ b/src/tbf_ul_ack_fsm.c
@@ -33,13 +33,13 @@
#define X(s) (1 << (s))
-const struct osmo_tdef_state_timeout tbf_ul_ack_fsm_timeouts[32] = {
+static const struct osmo_tdef_state_timeout tbf_ul_ack_fsm_timeouts[32] = {
[TBF_UL_ACK_ST_NONE] = {},
[TBF_UL_ACK_ST_SCHED_UL_ACK] = {},
[TBF_UL_ACK_ST_WAIT_ACK] = {},
};
-const struct value_string tbf_ul_ack_fsm_event_names[] = {
+static const struct value_string tbf_ul_ack_fsm_event_names[] = {
{ TBF_UL_ACK_EV_SCHED_ACK, "SCHED_ACK" },
{ TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, "CREATE_RLCMAC_MSG" },
{ TBF_UL_ACK_EV_RX_CTRL_ACK, "RX_CTRL_ACK" },
@@ -47,6 +47,15 @@
{ 0, NULL }
};
+/* Transition to a state, using the T timer defined in tbf_ul_ack_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_ul_ack_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+ tbf_ul_ack_fsm_timeouts, \
+ the_pcu->T_defs, \
+ -1)
+
static struct msgb *create_ul_ack_nack(const struct tbf_ul_ack_fsm_ctx *ctx,
const struct tbf_ul_ack_ev_create_rlcmac_msg_ctx *d,
bool final)
diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h
index d0005eb..3f34f31 100644
--- a/src/tbf_ul_ack_fsm.h
+++ b/src/tbf_ul_ack_fsm.h
@@ -42,16 +42,6 @@
struct gprs_rlcmac_ul_tbf *tbf; /* back pointer */
};
-extern const struct osmo_tdef_state_timeout tbf_ul_ack_fsm_timeouts[32];
-/* Transition to a state, using the T timer defined in tbf_ul_ack_fsm_timeouts.
- * The actual timeout value is in turn obtained from conn->T_defs.
- * Assumes local variable fi exists. */
-#define tbf_ul_ack_fsm_state_chg(fi, NEXT_STATE) \
- osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
- tbf_ul_ack_fsm_timeouts, \
- the_pcu->T_defs, \
- -1)
-
extern struct osmo_fsm tbf_ul_ack_fsm;
diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c
index e15f21c..0fea902 100644
--- a/src/tbf_ul_ass_fsm.c
+++ b/src/tbf_ul_ass_fsm.c
@@ -31,14 +31,14 @@
#define X(s) (1 << (s))
-const struct osmo_tdef_state_timeout tbf_ul_ass_fsm_timeouts[32] = {
+static const struct osmo_tdef_state_timeout tbf_ul_ass_fsm_timeouts[32] = {
[TBF_UL_ASS_NONE] = {},
[TBF_UL_ASS_SEND_ASS] = {},
[TBF_UL_ASS_SEND_ASS_REJ] = {},
[TBF_UL_ASS_WAIT_ACK] = {},
};
-const struct value_string tbf_ul_ass_fsm_event_names[] = {
+static const struct value_string tbf_ul_ass_fsm_event_names[] = {
{ TBF_UL_ASS_EV_SCHED_ASS, "SCHED_ASS" },
{ TBF_UL_ASS_EV_SCHED_ASS_REJ, "SCHED_ASS_REJ" },
{ TBF_UL_ASS_EV_CREATE_RLCMAC_MSG, "CREATE_RLCMAC_MSG" },
@@ -48,6 +48,15 @@
{ 0, NULL }
};
+/* Transition to a state, using the T timer defined in tbf_ul_ass_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_ul_ass_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+ tbf_ul_ass_fsm_timeouts, \
+ the_pcu->T_defs, \
+ -1)
+
static struct msgb *create_packet_access_reject(const struct tbf_ul_ass_fsm_ctx *ctx)
{
struct msgb *msg;
@@ -71,7 +80,7 @@
}
-struct msgb *create_packet_ul_assign(const struct tbf_ul_ass_fsm_ctx *ctx,
+static struct msgb *create_packet_ul_assign(const struct tbf_ul_ass_fsm_ctx *ctx,
const struct tbf_ul_ass_ev_create_rlcmac_msg_ctx *d)
{
struct msgb *msg = NULL;
diff --git a/src/tbf_ul_ass_fsm.h b/src/tbf_ul_ass_fsm.h
index a978e91..28a09dc 100644
--- a/src/tbf_ul_ass_fsm.h
+++ b/src/tbf_ul_ass_fsm.h
@@ -44,16 +44,6 @@
struct gprs_rlcmac_tbf* tbf; /* back pointer */
};
-extern const struct osmo_tdef_state_timeout tbf_ul_ass_fsm_timeouts[32];
-/* Transition to a state, using the T timer defined in tbf_ul_ass_fsm_timeouts.
- * The actual timeout value is in turn obtained from conn->T_defs.
- * Assumes local variable fi exists. */
-#define tbf_ul_ass_fsm_state_chg(fi, NEXT_STATE) \
- osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
- tbf_ul_ass_fsm_timeouts, \
- the_pcu->T_defs, \
- -1)
-
extern struct osmo_fsm tbf_ul_ass_fsm;
diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c
index fb4a256..571c689 100644
--- a/src/tbf_ul_fsm.c
+++ b/src/tbf_ul_fsm.c
@@ -29,7 +29,7 @@
#define X(s) (1 << (s))
-const struct osmo_tdef_state_timeout tbf_ul_fsm_timeouts[32] = {
+static const struct osmo_tdef_state_timeout tbf_ul_fsm_timeouts[32] = {
[TBF_ST_NEW] = {},
[TBF_ST_ASSIGN] = { },
[TBF_ST_FLOW] = { },
To view, visit change 31096. To unsubscribe, or for help writing mail filters, visit settings.