Commit f526b20a authored by Tina Ruchandani's avatar Tina Ruchandani Committed by Greg Kroah-Hartman

Staging: lustre: lnet: Make functions static

This patch makes the following functions static
as they are only used in their respective files.
These functions were detected by sparse.
- lib-md.c   : lnet_md_validate
- lib-move.c : lnet_ni_*
               lnet_setpayloadbuffer
               lnet_peer_alive_locked
               lnet_msg2bufpool
               lnet_post_routed_recv_locked
               lnet_configure / lnet_unconfigure
               lnet_ioctl
               init_lnet
               fini_lnet
Signed-off-by: default avatarTina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3247c4e5
...@@ -218,7 +218,7 @@ lnet_md_deconstruct(lnet_libmd_t *lmd, lnet_md_t *umd) ...@@ -218,7 +218,7 @@ lnet_md_deconstruct(lnet_libmd_t *lmd, lnet_md_t *umd)
lnet_eq2handle(&umd->eq_handle, lmd->md_eq); lnet_eq2handle(&umd->eq_handle, lmd->md_eq);
} }
int static int
lnet_md_validate(lnet_md_t *umd) lnet_md_validate(lnet_md_t *umd)
{ {
if (umd->start == NULL && umd->length != 0) { if (umd->start == NULL && umd->length != 0) {
......
...@@ -561,7 +561,7 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst, ...@@ -561,7 +561,7 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
} }
EXPORT_SYMBOL(lnet_extract_kiov); EXPORT_SYMBOL(lnet_extract_kiov);
void static void
lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
unsigned int offset, unsigned int mlen, unsigned int rlen) unsigned int offset, unsigned int mlen, unsigned int rlen)
{ {
...@@ -599,7 +599,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, ...@@ -599,7 +599,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
lnet_finalize(ni, msg, rc); lnet_finalize(ni, msg, rc);
} }
void static void
lnet_setpayloadbuffer(lnet_msg_t *msg) lnet_setpayloadbuffer(lnet_msg_t *msg)
{ {
lnet_libmd_t *md = msg->msg_md; lnet_libmd_t *md = msg->msg_md;
...@@ -639,7 +639,7 @@ lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target, ...@@ -639,7 +639,7 @@ lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target,
msg->msg_hdr.payload_length = cpu_to_le32(len); msg->msg_hdr.payload_length = cpu_to_le32(len);
} }
void static void
lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg) lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg)
{ {
void *priv = msg->msg_private; void *priv = msg->msg_private;
...@@ -654,7 +654,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg) ...@@ -654,7 +654,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg)
lnet_finalize(ni, msg, rc); lnet_finalize(ni, msg, rc);
} }
int static int
lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg) lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg)
{ {
int rc; int rc;
...@@ -679,7 +679,7 @@ lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg) ...@@ -679,7 +679,7 @@ lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg)
} }
/* NB: caller shall hold a ref on 'lp' as I'd drop lnet_net_lock */ /* NB: caller shall hold a ref on 'lp' as I'd drop lnet_net_lock */
void static void
lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp) lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp)
{ {
unsigned long last_alive = 0; unsigned long last_alive = 0;
...@@ -731,7 +731,7 @@ lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now) ...@@ -731,7 +731,7 @@ lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now)
/* NB: returns 1 when alive, 0 when dead, negative when error; /* NB: returns 1 when alive, 0 when dead, negative when error;
* may drop the lnet_net_lock */ * may drop the lnet_net_lock */
int static int
lnet_peer_alive_locked(lnet_peer_t *lp) lnet_peer_alive_locked(lnet_peer_t *lp)
{ {
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
...@@ -871,7 +871,7 @@ lnet_post_send_locked(lnet_msg_t *msg, int do_send) ...@@ -871,7 +871,7 @@ lnet_post_send_locked(lnet_msg_t *msg, int do_send)
} }
lnet_rtrbufpool_t * static lnet_rtrbufpool_t *
lnet_msg2bufpool(lnet_msg_t *msg) lnet_msg2bufpool(lnet_msg_t *msg)
{ {
lnet_rtrbufpool_t *rbp; lnet_rtrbufpool_t *rbp;
...@@ -891,7 +891,7 @@ lnet_msg2bufpool(lnet_msg_t *msg) ...@@ -891,7 +891,7 @@ lnet_msg2bufpool(lnet_msg_t *msg)
return rbp; return rbp;
} }
int static int
lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv) lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv)
{ {
/* lnet_parse is going to lnet_net_unlock immediately after this, so it /* lnet_parse is going to lnet_net_unlock immediately after this, so it
......
...@@ -43,7 +43,7 @@ MODULE_PARM_DESC(config_on_load, "configure network at module load"); ...@@ -43,7 +43,7 @@ MODULE_PARM_DESC(config_on_load, "configure network at module load");
static struct mutex lnet_config_mutex; static struct mutex lnet_config_mutex;
int static int
lnet_configure(void *arg) lnet_configure(void *arg)
{ {
/* 'arg' only there so I can be passed to cfs_create_thread() */ /* 'arg' only there so I can be passed to cfs_create_thread() */
...@@ -63,7 +63,7 @@ lnet_configure(void *arg) ...@@ -63,7 +63,7 @@ lnet_configure(void *arg)
return rc; return rc;
} }
int static int
lnet_unconfigure(void) lnet_unconfigure(void)
{ {
int refcount; int refcount;
...@@ -83,7 +83,7 @@ lnet_unconfigure(void) ...@@ -83,7 +83,7 @@ lnet_unconfigure(void)
return (refcount == 0) ? 0 : -EBUSY; return (refcount == 0) ? 0 : -EBUSY;
} }
int static int
lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data) lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
{ {
int rc; int rc;
...@@ -110,7 +110,7 @@ lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data) ...@@ -110,7 +110,7 @@ lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl); DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl);
int static int
init_lnet(void) init_lnet(void)
{ {
int rc; int rc;
...@@ -135,7 +135,7 @@ init_lnet(void) ...@@ -135,7 +135,7 @@ init_lnet(void)
return 0; return 0;
} }
void static void
fini_lnet(void) fini_lnet(void)
{ {
int rc; int rc;
......
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