Commit a1b593e1 authored by Jean-Claude BAU's avatar Jean-Claude BAU Committed by Adam Wujek

Code optimization: force static functions when public is nor required

(636 bytes)
parent 1ab26446
......@@ -376,25 +376,13 @@ extern void bmc_s1(struct pp_instance *ppi,
struct pp_frgn_master *frgn_master);
extern void bmc_p1(struct pp_instance *ppi);
extern void bmc_p2(struct pp_instance *ppi);
extern void bmc_setup_local_frgn_master(struct pp_instance *ppi,
struct pp_frgn_master *frgn_master);
extern int bmc_idcmp(struct ClockIdentity *a, struct ClockIdentity *b);
extern int bmc_pidcmp(struct PortIdentity *a, struct PortIdentity *b);
extern int bmc(struct pp_instance *ppi);
extern int bmc_gm_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b);
extern int bmc_topology_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b);
extern int bmc_dataset_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b);
extern void bmc_store_frgn_master(struct pp_instance *ppi,
struct pp_frgn_master *frgn_master, void *buf, int len);
extern void bmc_add_frgn_master(struct pp_instance *ppi, void *buf,
int len);
extern int bmc_check_frgn_master(struct pp_instance *ppi);
/* msg.c */
extern void msg_init_header(struct pp_instance *ppi, void *buf);
......
......@@ -301,7 +301,7 @@ void bmc_p2(struct pp_instance *ppi)
}
/* Copy local data set into header and announce message. 9.3.4 table 12. */
void bmc_setup_local_frgn_master(struct pp_instance *ppi,
static void bmc_setup_local_frgn_master(struct pp_instance *ppi,
struct pp_frgn_master *frgn_master)
{
int i;
......@@ -348,7 +348,7 @@ int bmc_pidcmp(struct PortIdentity *a, struct PortIdentity *b)
}
/* compare part2 of the datasets which is the topology, fig 27, page 89 */
int bmc_gm_cmp(struct pp_instance *ppi,
static int bmc_gm_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b)
{
......@@ -434,7 +434,7 @@ int bmc_gm_cmp(struct pp_instance *ppi,
}
/* compare part2 of the datasets which is the topology, fig 28, page 90 */
int bmc_topology_cmp(struct pp_instance *ppi,
static int bmc_topology_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b)
{
......@@ -544,12 +544,13 @@ int bmc_topology_cmp(struct pp_instance *ppi,
return bmc_pidcmp(pidrxa, pidrxb);
}
/*
* Data set comparison between two foreign masters. Return similar to
* memcmp(). However, lower values take precedence, so in A-B (like
* in comparisons, > 0 means B wins (and < 0 means A wins).
*/
int bmc_dataset_cmp(struct pp_instance *ppi,
static int bmc_dataset_cmp(struct pp_instance *ppi,
struct pp_frgn_master *a,
struct pp_frgn_master *b)
{
......@@ -565,6 +566,7 @@ int bmc_dataset_cmp(struct pp_instance *ppi,
}
}
/* State decision algorithm 9.3.3 Fig 26 */
static int bmc_state_decision(struct pp_instance *ppi)
{
......@@ -1090,7 +1092,7 @@ static void bmc_age_frgn_master(struct pp_instance *ppi)
/* returns 0 if erbest is not from another port of the device,
* 1 if the port shall go to passive
*/
int bmc_check_frgn_master(struct pp_instance *ppi)
static int bmc_check_frgn_master(struct pp_instance *ppi)
{
int i;
struct PortIdentity *pid;
......@@ -1145,7 +1147,7 @@ static int bmc_any_port_initializing(struct pp_globals *ppg)
return 0;
}
static void inline bmc_update_erbest_inst(struct pp_instance *ppi) {
static void bmc_update_erbest_inst(struct pp_instance *ppi) {
struct pp_frgn_master *frgn_master;
PortIdentity *frgn_master_pid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment