Commit c272937f authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: lustre: make functions as static

These functions are only referenced in this file scope
so it can be marked static.
And remove space between function name and open parenthesis.
Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e26b0da1
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "o2iblnd.h" #include "o2iblnd.h"
#include <asm/div64.h> #include <asm/div64.h>
lnd_t the_o2iblnd = { static lnd_t the_o2iblnd = {
.lnd_type = O2IBLND, .lnd_type = O2IBLND,
.lnd_startup = kiblnd_startup, .lnd_startup = kiblnd_startup,
.lnd_shutdown = kiblnd_shutdown, .lnd_shutdown = kiblnd_shutdown,
...@@ -53,8 +53,8 @@ lnd_t the_o2iblnd = { ...@@ -53,8 +53,8 @@ lnd_t the_o2iblnd = {
kib_data_t kiblnd_data; kib_data_t kiblnd_data;
__u32 static __u32
kiblnd_cksum (void *ptr, int nob) kiblnd_cksum(void *ptr, int nob)
{ {
char *c = ptr; char *c = ptr;
__u32 sum = 0; __u32 sum = 0;
...@@ -429,8 +429,8 @@ kiblnd_unlink_peer_locked (kib_peer_t *peer) ...@@ -429,8 +429,8 @@ kiblnd_unlink_peer_locked (kib_peer_t *peer)
kiblnd_peer_decref(peer); kiblnd_peer_decref(peer);
} }
int static int
kiblnd_get_peer_info (lnet_ni_t *ni, int index, kiblnd_get_peer_info(lnet_ni_t *ni, int index,
lnet_nid_t *nidp, int *count) lnet_nid_t *nidp, int *count)
{ {
kib_peer_t *peer; kib_peer_t *peer;
...@@ -468,8 +468,8 @@ kiblnd_get_peer_info (lnet_ni_t *ni, int index, ...@@ -468,8 +468,8 @@ kiblnd_get_peer_info (lnet_ni_t *ni, int index,
return -ENOENT; return -ENOENT;
} }
void static void
kiblnd_del_peer_locked (kib_peer_t *peer) kiblnd_del_peer_locked(kib_peer_t *peer)
{ {
struct list_head *ctmp; struct list_head *ctmp;
struct list_head *cnxt; struct list_head *cnxt;
...@@ -489,8 +489,8 @@ kiblnd_del_peer_locked (kib_peer_t *peer) ...@@ -489,8 +489,8 @@ kiblnd_del_peer_locked (kib_peer_t *peer)
* last ref on it. */ * last ref on it. */
} }
int static int
kiblnd_del_peer (lnet_ni_t *ni, lnet_nid_t nid) kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid)
{ {
LIST_HEAD (zombies); LIST_HEAD (zombies);
struct list_head *ptmp; struct list_head *ptmp;
...@@ -543,8 +543,8 @@ kiblnd_del_peer (lnet_ni_t *ni, lnet_nid_t nid) ...@@ -543,8 +543,8 @@ kiblnd_del_peer (lnet_ni_t *ni, lnet_nid_t nid)
return rc; return rc;
} }
kib_conn_t * static kib_conn_t *
kiblnd_get_conn_by_idx (lnet_ni_t *ni, int index) kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index)
{ {
kib_peer_t *peer; kib_peer_t *peer;
struct list_head *ptmp; struct list_head *ptmp;
...@@ -584,16 +584,16 @@ kiblnd_get_conn_by_idx (lnet_ni_t *ni, int index) ...@@ -584,16 +584,16 @@ kiblnd_get_conn_by_idx (lnet_ni_t *ni, int index)
return NULL; return NULL;
} }
void static void
kiblnd_debug_rx (kib_rx_t *rx) kiblnd_debug_rx(kib_rx_t *rx)
{ {
CDEBUG(D_CONSOLE, " %p status %d msg_type %x cred %d\n", CDEBUG(D_CONSOLE, " %p status %d msg_type %x cred %d\n",
rx, rx->rx_status, rx->rx_msg->ibm_type, rx, rx->rx_status, rx->rx_msg->ibm_type,
rx->rx_msg->ibm_credits); rx->rx_msg->ibm_credits);
} }
void static void
kiblnd_debug_tx (kib_tx_t *tx) kiblnd_debug_tx(kib_tx_t *tx)
{ {
CDEBUG(D_CONSOLE, " %p snd %d q %d w %d rc %d dl %lx " CDEBUG(D_CONSOLE, " %p snd %d q %d w %d rc %d dl %lx "
"cookie "LPX64" msg %s%s type %x cred %d\n", "cookie "LPX64" msg %s%s type %x cred %d\n",
...@@ -604,8 +604,8 @@ kiblnd_debug_tx (kib_tx_t *tx) ...@@ -604,8 +604,8 @@ kiblnd_debug_tx (kib_tx_t *tx)
tx->tx_msg->ibm_type, tx->tx_msg->ibm_credits); tx->tx_msg->ibm_type, tx->tx_msg->ibm_credits);
} }
void static void
kiblnd_debug_conn (kib_conn_t *conn) kiblnd_debug_conn(kib_conn_t *conn)
{ {
struct list_head *tmp; struct list_head *tmp;
int i; int i;
...@@ -1039,8 +1039,8 @@ kiblnd_close_stale_conns_locked (kib_peer_t *peer, ...@@ -1039,8 +1039,8 @@ kiblnd_close_stale_conns_locked (kib_peer_t *peer,
return count; return count;
} }
int static int
kiblnd_close_matching_conns (lnet_ni_t *ni, lnet_nid_t nid) kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid)
{ {
kib_peer_t *peer; kib_peer_t *peer;
struct list_head *ptmp; struct list_head *ptmp;
...@@ -1440,7 +1440,7 @@ kiblnd_find_rd_dma_mr(kib_hca_dev_t *hdev, kib_rdma_desc_t *rd) ...@@ -1440,7 +1440,7 @@ kiblnd_find_rd_dma_mr(kib_hca_dev_t *hdev, kib_rdma_desc_t *rd)
return mr; return mr;
} }
void static void
kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool) kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool)
{ {
LASSERT (pool->fpo_map_count == 0); LASSERT (pool->fpo_map_count == 0);
...@@ -1454,7 +1454,7 @@ kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool) ...@@ -1454,7 +1454,7 @@ kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool)
LIBCFS_FREE(pool, sizeof(kib_fmr_pool_t)); LIBCFS_FREE(pool, sizeof(kib_fmr_pool_t));
} }
void static void
kiblnd_destroy_fmr_pool_list(struct list_head *head) kiblnd_destroy_fmr_pool_list(struct list_head *head)
{ {
kib_fmr_pool_t *pool; kib_fmr_pool_t *pool;
...@@ -1480,7 +1480,7 @@ static int kiblnd_fmr_flush_trigger(int ncpts) ...@@ -1480,7 +1480,7 @@ static int kiblnd_fmr_flush_trigger(int ncpts)
return max(IBLND_FMR_POOL_FLUSH, size); return max(IBLND_FMR_POOL_FLUSH, size);
} }
int static int
kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t **pp_fpo) kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t **pp_fpo)
{ {
/* FMR pool for RDMA */ /* FMR pool for RDMA */
...@@ -1719,7 +1719,7 @@ kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size) ...@@ -1719,7 +1719,7 @@ kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size)
pool->po_size = size; pool->po_size = size;
} }
void static void
kiblnd_destroy_pool_list(struct list_head *head) kiblnd_destroy_pool_list(struct list_head *head)
{ {
kib_pool_t *pool; kib_pool_t *pool;
...@@ -2192,7 +2192,7 @@ kiblnd_tx_init(kib_pool_t *pool, struct list_head *node) ...@@ -2192,7 +2192,7 @@ kiblnd_tx_init(kib_pool_t *pool, struct list_head *node)
tx->tx_cookie = tps->tps_next_tx_cookie ++; tx->tx_cookie = tps->tps_next_tx_cookie ++;
} }
void static void
kiblnd_net_fini_pools(kib_net_t *net) kiblnd_net_fini_pools(kib_net_t *net)
{ {
int i; int i;
...@@ -2234,7 +2234,7 @@ kiblnd_net_fini_pools(kib_net_t *net) ...@@ -2234,7 +2234,7 @@ kiblnd_net_fini_pools(kib_net_t *net)
} }
} }
int static int
kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts) kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
{ {
unsigned long flags; unsigned long flags;
...@@ -2408,7 +2408,7 @@ kiblnd_hdev_get_attr(kib_hca_dev_t *hdev) ...@@ -2408,7 +2408,7 @@ kiblnd_hdev_get_attr(kib_hca_dev_t *hdev)
return -EINVAL; return -EINVAL;
} }
void static void
kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev) kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev)
{ {
int i; int i;
...@@ -2442,7 +2442,7 @@ kiblnd_hdev_destroy(kib_hca_dev_t *hdev) ...@@ -2442,7 +2442,7 @@ kiblnd_hdev_destroy(kib_hca_dev_t *hdev)
LIBCFS_FREE(hdev, sizeof(*hdev)); LIBCFS_FREE(hdev, sizeof(*hdev));
} }
int static int
kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev) kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
{ {
struct ib_mr *mr; struct ib_mr *mr;
...@@ -2746,7 +2746,7 @@ kiblnd_destroy_dev (kib_dev_t *dev) ...@@ -2746,7 +2746,7 @@ kiblnd_destroy_dev (kib_dev_t *dev)
LIBCFS_FREE(dev, sizeof(*dev)); LIBCFS_FREE(dev, sizeof(*dev));
} }
kib_dev_t * static kib_dev_t *
kiblnd_create_dev(char *ifname) kiblnd_create_dev(char *ifname)
{ {
struct net_device *netdev; struct net_device *netdev;
...@@ -2800,7 +2800,7 @@ kiblnd_create_dev(char *ifname) ...@@ -2800,7 +2800,7 @@ kiblnd_create_dev(char *ifname)
return dev; return dev;
} }
void static void
kiblnd_base_shutdown(void) kiblnd_base_shutdown(void)
{ {
struct kib_sched_info *sched; struct kib_sched_info *sched;
...@@ -2940,7 +2940,7 @@ kiblnd_shutdown (lnet_ni_t *ni) ...@@ -2940,7 +2940,7 @@ kiblnd_shutdown (lnet_ni_t *ni)
return; return;
} }
int static int
kiblnd_base_startup(void) kiblnd_base_startup(void)
{ {
struct kib_sched_info *sched; struct kib_sched_info *sched;
...@@ -3030,7 +3030,7 @@ kiblnd_base_startup(void) ...@@ -3030,7 +3030,7 @@ kiblnd_base_startup(void)
return -ENETDOWN; return -ENETDOWN;
} }
int static int
kiblnd_start_schedulers(struct kib_sched_info *sched) kiblnd_start_schedulers(struct kib_sched_info *sched)
{ {
int rc = 0; int rc = 0;
...@@ -3071,7 +3071,7 @@ kiblnd_start_schedulers(struct kib_sched_info *sched) ...@@ -3071,7 +3071,7 @@ kiblnd_start_schedulers(struct kib_sched_info *sched)
return rc; return rc;
} }
int static int
kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts) kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts)
{ {
int cpt; int cpt;
...@@ -3097,7 +3097,7 @@ kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts) ...@@ -3097,7 +3097,7 @@ kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts)
return 0; return 0;
} }
kib_dev_t * static kib_dev_t *
kiblnd_dev_search(char *ifname) kiblnd_dev_search(char *ifname)
{ {
kib_dev_t *alias = NULL; kib_dev_t *alias = NULL;
...@@ -3226,13 +3226,13 @@ kiblnd_startup (lnet_ni_t *ni) ...@@ -3226,13 +3226,13 @@ kiblnd_startup (lnet_ni_t *ni)
return -ENETDOWN; return -ENETDOWN;
} }
void __exit static void __exit
kiblnd_module_fini (void) kiblnd_module_fini (void)
{ {
lnet_unregister_lnd(&the_o2iblnd); lnet_unregister_lnd(&the_o2iblnd);
} }
int __init static int __init
kiblnd_module_init (void) kiblnd_module_init (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