This reduces the code size by about 400 bytes.
Change-Id: I158c3b2c5c68f92938c29090faab1c0153d19e2e
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11306
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
void lnet_router_checker_stop(void);
void lnet_swap_pinginfo(lnet_ping_info_t *info);
void lnet_router_checker_stop(void);
void lnet_swap_pinginfo(lnet_ping_info_t *info);
-int lnet_ping(lnet_process_id_t id, int timeout_ms,
- lnet_process_id_t *ids, int n_ids);
-
int lnet_parse_ip2nets(char **networksp, char *ip2nets);
int lnet_parse_routes(char *route_str, int *im_a_router);
int lnet_parse_networks(struct list_head *nilist, char *networks);
int lnet_parse_ip2nets(char **networksp, char *ip2nets);
int lnet_parse_routes(char *route_str, int *im_a_router);
int lnet_parse_networks(struct list_head *nilist, char *networks);
CFS_MODULE_PARM(rnet_htable_size, "i", int, 0444,
"size of remote network hash table");
CFS_MODULE_PARM(rnet_htable_size, "i", int, 0444,
"size of remote network hash table");
+static void lnet_ping_target_fini(void);
+static int lnet_ping(lnet_process_id_t id, int timeout_ms,
+ lnet_process_id_t *ids, int n_ids);
+
+static char *
lnet_get_routes(void)
{
return routes;
}
lnet_get_routes(void)
{
return routes;
}
lnet_get_networks(void)
{
char *nets;
lnet_get_networks(void)
{
char *nets;
lnet_init_locks(void)
{
spin_lock_init(&the_lnet.ln_eq_wait_lock);
lnet_init_locks(void)
{
spin_lock_init(&the_lnet.ln_eq_wait_lock);
mutex_init(&the_lnet.ln_api_mutex);
}
mutex_init(&the_lnet.ln_api_mutex);
}
lnet_fini_locks(void)
{
}
#else
lnet_fini_locks(void)
{
}
#else
lnet_get_routes(void)
{
char *str = getenv("LNET_ROUTES");
lnet_get_routes(void)
{
char *str = getenv("LNET_ROUTES");
return (str == NULL) ? "" : str;
}
return (str == NULL) ? "" : str;
}
lnet_get_networks (void)
{
static char default_networks[256];
lnet_get_networks (void)
{
static char default_networks[256];
-void lnet_init_locks(void)
+static void lnet_init_locks(void)
{
the_lnet.ln_eq_wait_lock = 0;
the_lnet.ln_lnd_mutex = 0;
the_lnet.ln_api_mutex = 0;
}
{
the_lnet.ln_eq_wait_lock = 0;
the_lnet.ln_lnd_mutex = 0;
the_lnet.ln_api_mutex = 0;
}
-void lnet_fini_locks(void)
+static void lnet_fini_locks(void)
{
LASSERT(the_lnet.ln_api_mutex == 0);
LASSERT(the_lnet.ln_lnd_mutex == 0);
{
LASSERT(the_lnet.ln_api_mutex == 0);
LASSERT(the_lnet.ln_lnd_mutex == 0);
-void lnet_init_locks(void)
+static void lnet_init_locks(void)
{
pthread_cond_init(&the_lnet.ln_eq_cond, NULL);
pthread_mutex_init(&the_lnet.ln_eq_wait_lock, NULL);
{
pthread_cond_init(&the_lnet.ln_eq_cond, NULL);
pthread_mutex_init(&the_lnet.ln_eq_wait_lock, NULL);
pthread_mutex_init(&the_lnet.ln_api_mutex, NULL);
}
pthread_mutex_init(&the_lnet.ln_api_mutex, NULL);
}
-void lnet_fini_locks(void)
+static void lnet_fini_locks(void)
{
pthread_mutex_destroy(&the_lnet.ln_api_mutex);
pthread_mutex_destroy(&the_lnet.ln_lnd_mutex);
{
pthread_mutex_destroy(&the_lnet.ln_api_mutex);
pthread_mutex_destroy(&the_lnet.ln_lnd_mutex);
-void lnet_assert_wire_constants (void)
+static void lnet_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
* running on Linux robert.bartonsoftware.com 2.6.8-1.521
{
/* Wire protocol assertions generated by 'wirecheck'
* running on Linux robert.bartonsoftware.com 2.6.8-1.521
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
}
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
}
lnet_find_lnd_by_type (int type)
{
lnd_t *lnd;
lnet_find_lnd_by_type (int type)
{
lnd_t *lnd;
#endif /* LNET_USE_LIB_FREELIST */
#endif /* LNET_USE_LIB_FREELIST */
-__u64 lnet_create_interface_cookie (void)
+static __u64 lnet_create_interface_cookie(void)
{
/* NB the interface cookie in wire handles guards against delayed
* replies and ACKs appearing valid after reboot. Initialisation time,
{
/* NB the interface cookie in wire handles guards against delayed
* replies and ACKs appearing valid after reboot. Initialisation time,
lnet_res_container_cleanup(struct lnet_res_container *rec)
{
int count = 0;
lnet_res_container_cleanup(struct lnet_res_container *rec)
{
int count = 0;
rec->rec_type = 0; /* mark it as finalized */
}
rec->rec_type = 0; /* mark it as finalized */
}
lnet_res_container_setup(struct lnet_res_container *rec,
int cpt, int type, int objnum, int objsz)
{
lnet_res_container_setup(struct lnet_res_container *rec,
int cpt, int type, int objnum, int objsz)
{
-int lnet_unprepare(void);
+static int lnet_unprepare(void);
lnet_prepare(lnet_pid_t requested_pid)
{
/* Prepare to bring up the network */
lnet_prepare(lnet_pid_t requested_pid)
{
/* Prepare to bring up the network */
lnet_unprepare (void)
{
/* NB no LNET_LOCK since this is the last reference. All LND instances
lnet_unprepare (void)
{
/* NB no LNET_LOCK since this is the last reference. All LND instances
}
EXPORT_SYMBOL(LNetSnprintHandle);
}
EXPORT_SYMBOL(LNetSnprintHandle);
lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids,
int n_ids)
{
lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids,
int n_ids)
{