[PATCH v2 1/1] staging: lustre: lnet: api-ni.c: fixed sparse warnings

From: Anil Belur
Date: Sat Jun 28 2014 - 11:56:45 EST


From: Anil Belur <askb23@xxxxxxxxx>

- this fixes few sparse warnings for missing static in functions:

drivers/staging/lustre/lnet/lnet/api-ni.c:63:6: warning: symbol 'lnet_get_routes' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:69:6: warning: symbol 'lnet_get_networks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:93:1: warning: symbol 'lnet_init_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:102:1: warning: symbol 'lnet_fini_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:180:6: warning: symbol 'lnet_assert_wire_constants' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:273:7: warning: symbol 'lnet_find_lnd_by_type' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:419:1: warning: symbol 'lnet_create_interface_cookie' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:450:1: warning: symbol 'lnet_res_container_cleanup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:494:1: warning: symbol 'lnet_res_container_setup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:612:1: warning: symbol 'lnet_prepare' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:917:1: warning: symbol 'lnet_shutdown_lndnis' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:1034:1: warning: symbol 'lnet_startup_lndnis' was not declared. Should it be static?

Signed-off-by: Anil Belur <askb23@xxxxxxxxx>
---
drivers/staging/lustre/lnet/lnet/api-ni.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 3f878de..cd6792e 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -60,13 +60,13 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT;
module_param(rnet_htable_size, int, 0444);
MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table");

-char *
+static char *
lnet_get_routes(void)
{
return routes;
}

-char *
+static char *
lnet_get_networks(void)
{
char *nets;
@@ -89,7 +89,7 @@ lnet_get_networks(void)
return "tcp";
}

-void
+static void
lnet_init_locks(void)
{
spin_lock_init(&the_lnet.ln_eq_wait_lock);
@@ -98,7 +98,7 @@ lnet_init_locks(void)
mutex_init(&the_lnet.ln_api_mutex);
}

-void
+static void
lnet_fini_locks(void)
{
}
@@ -177,7 +177,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
@@ -270,7 +270,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;
@@ -415,7 +415,7 @@ lnet_freelist_fini (lnet_freelist_t *fl)

#endif /* LNET_USE_LIB_FREELIST */

-__u64
+static __u64
lnet_create_interface_cookie (void)
{
/* NB the interface cookie in wire handles guards against delayed
@@ -446,7 +446,7 @@ lnet_res_type2str(int type)
}
}

-void
+static void
lnet_res_container_cleanup(struct lnet_res_container *rec)
{
int count = 0;
@@ -490,7 +490,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)
{
@@ -608,7 +608,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)

int lnet_unprepare(void);

-int
+static int
lnet_prepare(lnet_pid_t requested_pid)
{
/* Prepare to bring up the network */
@@ -913,7 +913,7 @@ lnet_ni_tq_credits(lnet_ni_t *ni)
return credits;
}

-void
+static void
lnet_shutdown_lndnis (void)
{
int i;
@@ -1030,7 +1030,7 @@ lnet_shutdown_lndnis (void)
}
}

-int
+static int
lnet_startup_lndnis (void)
{
lnd_t *lnd;
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/