lb_peer: Mark multiple funcs as static

Change-Id: I7178608444f72bfb93b816a0bedee336a5b4cafe
This commit is contained in:
Pau Espin Pedrol
2025-07-14 19:09:17 +02:00
parent 310e21dbf1
commit 4f54a410f5
2 changed files with 18 additions and 19 deletions

View File

@@ -64,4 +64,3 @@ struct lb_peer *lb_peer_find(const struct sccp_lb_inst *sli, const struct osmo_s
int lb_peer_up_l2(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *calling_addr, bool co, uint32_t conn_id, int lb_peer_up_l2(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *calling_addr, bool co, uint32_t conn_id,
struct msgb *l2); struct msgb *l2);
void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id);

View File

@@ -88,7 +88,7 @@ static const struct osmo_tdef_state_timeout lb_peer_fsm_timeouts[32] = {
#define lb_peer_state_chg(LB_PEER, NEXT_STATE) \ #define lb_peer_state_chg(LB_PEER, NEXT_STATE) \
osmo_tdef_fsm_inst_state_chg((LB_PEER)->fi, NEXT_STATE, lb_peer_fsm_timeouts, g_smlc_tdefs, 5) osmo_tdef_fsm_inst_state_chg((LB_PEER)->fi, NEXT_STATE, lb_peer_fsm_timeouts, g_smlc_tdefs, 5)
void lb_peer_discard_all_conns(struct lb_peer *lbp) static void lb_peer_discard_all_conns(struct lb_peer *lbp)
{ {
struct lb_conn *lb_conn, *next; struct lb_conn *lb_conn, *next;
@@ -137,7 +137,7 @@ static void lb_peer_rx_reset_ack(struct lb_peer *lbp, struct msgb* msg)
lb_peer_state_chg(lbp, LB_PEER_ST_READY); lb_peer_state_chg(lbp, LB_PEER_ST_READY);
} }
void lb_peer_reset(struct lb_peer *lbp) static void lb_peer_reset(struct lb_peer *lbp)
{ {
struct bssap_le_pdu reset = { struct bssap_le_pdu reset = {
.discr = BSSAP_LE_MSG_DISCR_BSSMAP_LE, .discr = BSSAP_LE_MSG_DISCR_BSSMAP_LE,
@@ -167,7 +167,18 @@ void lb_peer_reset(struct lb_peer *lbp)
} }
} }
void lb_peer_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) static void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id)
{
struct lb_conn *lb_conn;
llist_for_each_entry(lb_conn, &sli->lb_conns, entry) {
if (lb_conn->sccp_conn_id == conn_id) {
lb_conn_discard(lb_conn);
return;
}
}
}
static void lb_peer_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{ {
struct lb_peer *lbp = fi->priv; struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx = data; struct lb_peer_ev_ctx *ctx = data;
@@ -196,7 +207,7 @@ void lb_peer_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *dat
} }
} }
void lb_peer_st_wait_rx_reset(struct osmo_fsm_inst *fi, uint32_t event, void *data) static void lb_peer_st_wait_rx_reset(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{ {
struct lb_peer *lbp = fi->priv; struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx; struct lb_peer_ev_ctx *ctx;
@@ -230,7 +241,7 @@ void lb_peer_st_wait_rx_reset(struct osmo_fsm_inst *fi, uint32_t event, void *da
} }
} }
void lb_peer_st_wait_rx_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data) static void lb_peer_st_wait_rx_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{ {
struct lb_peer *lbp = fi->priv; struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx; struct lb_peer_ev_ctx *ctx;
@@ -265,7 +276,7 @@ void lb_peer_st_wait_rx_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void
} }
} }
void lb_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data) static void lb_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{ {
struct lb_peer *lbp = fi->priv; struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx; struct lb_peer_ev_ctx *ctx;
@@ -336,7 +347,7 @@ static int lb_peer_fsm_timer_cb(struct osmo_fsm_inst *fi)
return 0; return 0;
} }
void lb_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) static void lb_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
{ {
struct lb_peer *lbp = fi->priv; struct lb_peer *lbp = fi->priv;
lb_peer_discard_all_conns(lbp); lb_peer_discard_all_conns(lbp);
@@ -482,14 +493,3 @@ int lb_peer_up_l2(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *calling
return osmo_fsm_inst_dispatch(lb_peer->fi, event, &ctx); return osmo_fsm_inst_dispatch(lb_peer->fi, event, &ctx);
} }
void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id)
{
struct lb_conn *lb_conn;
llist_for_each_entry(lb_conn, &sli->lb_conns, entry) {
if (lb_conn->sccp_conn_id == conn_id) {
lb_conn_discard(lb_conn);
return;
}
}
}