Whamcloud - gitweb
LU-5396: ni: make local functions static
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 5d4968e..c5ab239 100644 (file)
@@ -68,13 +68,17 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT;
 CFS_MODULE_PARM(rnet_htable_size, "i", int, 0444,
                "size of remote network hash table");
 
-char *
+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;
 }
 
-char *
+static char *
 lnet_get_networks(void)
 {
        char   *nets;
@@ -97,7 +101,7 @@ lnet_get_networks(void)
        return "tcp";
 }
 
-void
+static void
 lnet_init_locks(void)
 {
        spin_lock_init(&the_lnet.ln_eq_wait_lock);
@@ -106,14 +110,14 @@ lnet_init_locks(void)
        mutex_init(&the_lnet.ln_api_mutex);
 }
 
-void
+static void
 lnet_fini_locks(void)
 {
 }
 
 #else
 
-char *
+static char *
 lnet_get_routes(void)
 {
         char *str = getenv("LNET_ROUTES");
@@ -121,7 +125,7 @@ lnet_get_routes(void)
         return (str == NULL) ? "" : str;
 }
 
-char *
+static char *
 lnet_get_networks (void)
 {
        static char       default_networks[256];
@@ -161,14 +165,14 @@ lnet_get_networks (void)
 
 # ifndef HAVE_LIBPTHREAD
 
-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;
 }
 
-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);
@@ -177,7 +181,7 @@ void lnet_fini_locks(void)
 
 # else
 
-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);
@@ -185,7 +189,7 @@ void lnet_init_locks(void)
        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);
@@ -269,7 +273,7 @@ lnet_create_locks(void)
        return -ENOMEM;
 }
 
-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
@@ -362,7 +366,7 @@ void lnet_assert_wire_constants (void)
         CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
 }
 
-lnd_t *
+static lnd_t *
 lnet_find_lnd_by_type (int type)
 {
        lnd_t            *lnd;
@@ -504,7 +508,7 @@ lnet_freelist_fini(lnet_freelist_t *fl)
 
 #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,
@@ -539,7 +543,7 @@ lnet_res_type2str(int type)
        }
 }
 
-void
+static void
 lnet_res_container_cleanup(struct lnet_res_container *rec)
 {
        int     count = 0;
@@ -583,7 +587,7 @@ lnet_res_container_cleanup(struct lnet_res_container *rec)
        rec->rec_type = 0; /* mark it as finalized */
 }
 
-int
+static int
 lnet_res_container_setup(struct lnet_res_container *rec,
                         int cpt, int type, int objnum, int objsz)
 {
@@ -711,9 +715,9 @@ lnet_server_mode() {
 }
 #endif
 
-int lnet_unprepare(void);
+static int lnet_unprepare(void);
 
-int
+static int
 lnet_prepare(lnet_pid_t requested_pid)
 {
        /* Prepare to bring up the network */
@@ -808,7 +812,7 @@ lnet_prepare(lnet_pid_t requested_pid)
        return rc;
 }
 
-int
+static int
 lnet_unprepare (void)
 {
        /* NB no LNET_LOCK since this is the last reference.  All LND instances
@@ -2315,7 +2319,7 @@ LNetSnprintHandle(char *str, int len, lnet_handle_any_t h)
 }
 EXPORT_SYMBOL(LNetSnprintHandle);
 
-int
+static int
 lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids,
          int n_ids)
 {