Staging: lustre: o2iblnd.c: Started fixing coding style

I focused on function declarations (placed return type on the same line
as function name), and spaces between function name and parenthesis

Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Guillaume Matheron 2015-04-02 19:35:45 +02:00 committed by Greg Kroah-Hartman
parent 9fb186cf69
commit febe73bdab
1 changed files with 186 additions and 259 deletions

View File

@ -53,8 +53,7 @@ static lnd_t the_o2iblnd = {
kib_data_t kiblnd_data;
static __u32
kiblnd_cksum(void *ptr, int nob)
static __u32 kiblnd_cksum(void *ptr, int nob)
{
char *c = ptr;
__u32 sum = 0;
@ -66,8 +65,7 @@ kiblnd_cksum(void *ptr, int nob)
return (sum == 0) ? 1 : sum;
}
static char *
kiblnd_msgtype2str(int type)
static char *kiblnd_msgtype2str(int type)
{
switch (type) {
case IBLND_MSG_CONNREQ:
@ -105,8 +103,7 @@ kiblnd_msgtype2str(int type)
}
}
static int
kiblnd_msgtype2size(int type)
static int kiblnd_msgtype2size(int type)
{
const int hdr_size = offsetof(kib_msg_t, ibm_u);
@ -139,8 +136,7 @@ kiblnd_msgtype2size(int type)
}
}
static int
kiblnd_unpack_rd(kib_msg_t *msg, int flip)
static int kiblnd_unpack_rd(kib_msg_t *msg, int flip)
{
kib_rdma_desc_t *rd;
int nob;
@ -187,8 +183,7 @@ kiblnd_unpack_rd(kib_msg_t *msg, int flip)
return 0;
}
void
kiblnd_pack_msg (lnet_ni_t *ni, kib_msg_t *msg, int version,
void kiblnd_pack_msg(lnet_ni_t *ni, kib_msg_t *msg, int version,
int credits, lnet_nid_t dstnid, __u64 dststamp)
{
kib_net_t *net = ni->ni_data;
@ -212,8 +207,7 @@ kiblnd_pack_msg (lnet_ni_t *ni, kib_msg_t *msg, int version,
}
}
int
kiblnd_unpack_msg(kib_msg_t *msg, int nob)
int kiblnd_unpack_msg(kib_msg_t *msg, int nob)
{
const int hdr_size = offsetof(kib_msg_t, ibm_u);
__u32 msg_cksum;
@ -324,8 +318,7 @@ kiblnd_unpack_msg(kib_msg_t *msg, int nob)
return 0;
}
int
kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid)
int kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid)
{
kib_peer_t *peer;
kib_net_t *net = ni->ni_data;
@ -367,8 +360,7 @@ kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid)
return 0;
}
void
kiblnd_destroy_peer (kib_peer_t *peer)
void kiblnd_destroy_peer(kib_peer_t *peer)
{
kib_net_t *net = peer->ibp_ni->ni_data;
@ -389,8 +381,7 @@ kiblnd_destroy_peer (kib_peer_t *peer)
atomic_dec(&net->ibn_npeers);
}
kib_peer_t *
kiblnd_find_peer_locked (lnet_nid_t nid)
kib_peer_t *kiblnd_find_peer_locked(lnet_nid_t nid)
{
/* the caller is responsible for accounting the additional reference
* that this creates */
@ -418,8 +409,7 @@ kiblnd_find_peer_locked (lnet_nid_t nid)
return NULL;
}
void
kiblnd_unlink_peer_locked (kib_peer_t *peer)
void kiblnd_unlink_peer_locked(kib_peer_t *peer)
{
LASSERT(list_empty(&peer->ibp_conns));
@ -429,8 +419,7 @@ kiblnd_unlink_peer_locked (kib_peer_t *peer)
kiblnd_peer_decref(peer);
}
static int
kiblnd_get_peer_info(lnet_ni_t *ni, int index,
static int kiblnd_get_peer_info(lnet_ni_t *ni, int index,
lnet_nid_t *nidp, int *count)
{
kib_peer_t *peer;
@ -468,8 +457,7 @@ kiblnd_get_peer_info(lnet_ni_t *ni, int index,
return -ENOENT;
}
static void
kiblnd_del_peer_locked(kib_peer_t *peer)
static void kiblnd_del_peer_locked(kib_peer_t *peer)
{
struct list_head *ctmp;
struct list_head *cnxt;
@ -489,8 +477,7 @@ kiblnd_del_peer_locked(kib_peer_t *peer)
* last ref on it. */
}
static int
kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid)
static int kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid)
{
LIST_HEAD(zombies);
struct list_head *ptmp;
@ -543,8 +530,7 @@ kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid)
return rc;
}
static kib_conn_t *
kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index)
static kib_conn_t *kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index)
{
kib_peer_t *peer;
struct list_head *ptmp;
@ -584,8 +570,7 @@ kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index)
return NULL;
}
int
kiblnd_translate_mtu(int value)
int kiblnd_translate_mtu(int value)
{
switch (value) {
default:
@ -605,8 +590,7 @@ kiblnd_translate_mtu(int value)
}
}
static void
kiblnd_setup_mtu_locked(struct rdma_cm_id *cmid)
static void kiblnd_setup_mtu_locked(struct rdma_cm_id *cmid)
{
int mtu;
@ -620,8 +604,7 @@ kiblnd_setup_mtu_locked(struct rdma_cm_id *cmid)
cmid->route.path_rec->mtu = mtu;
}
static int
kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
static int kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
{
cpumask_t *mask;
int vectors;
@ -648,8 +631,7 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
return 1;
}
kib_conn_t *
kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid,
kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid,
int state, int version)
{
/* CAVEAT EMPTOR:
@ -851,8 +833,7 @@ kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid,
return NULL;
}
void
kiblnd_destroy_conn (kib_conn_t *conn)
void kiblnd_destroy_conn(kib_conn_t *conn)
{
struct rdma_cm_id *cmid = conn->ibc_cmid;
kib_peer_t *peer = conn->ibc_peer;
@ -919,8 +900,7 @@ kiblnd_destroy_conn (kib_conn_t *conn)
LIBCFS_FREE(conn, sizeof(*conn));
}
int
kiblnd_close_peer_conns_locked (kib_peer_t *peer, int why)
int kiblnd_close_peer_conns_locked(kib_peer_t *peer, int why)
{
kib_conn_t *conn;
struct list_head *ctmp;
@ -941,8 +921,7 @@ kiblnd_close_peer_conns_locked (kib_peer_t *peer, int why)
return count;
}
int
kiblnd_close_stale_conns_locked (kib_peer_t *peer,
int kiblnd_close_stale_conns_locked(kib_peer_t *peer,
int version, __u64 incarnation)
{
kib_conn_t *conn;
@ -969,8 +948,7 @@ kiblnd_close_stale_conns_locked (kib_peer_t *peer,
return count;
}
static int
kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid)
static int kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid)
{
kib_peer_t *peer;
struct list_head *ptmp;
@ -1017,8 +995,7 @@ kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid)
return (count == 0) ? -ENOENT : 0;
}
int
kiblnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
int kiblnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
{
struct libcfs_ioctl_data *data = arg;
int rc = -EINVAL;
@ -1071,8 +1048,7 @@ kiblnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
return rc;
}
void
kiblnd_query (lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when)
void kiblnd_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when)
{
unsigned long last_alive = 0;
unsigned long now = cfs_time_current();
@ -1106,8 +1082,7 @@ kiblnd_query (lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when)
return;
}
void
kiblnd_free_pages(kib_pages_t *p)
void kiblnd_free_pages(kib_pages_t *p)
{
int npages = p->ibp_npages;
int i;
@ -1120,8 +1095,7 @@ kiblnd_free_pages(kib_pages_t *p)
LIBCFS_FREE(p, offsetof(kib_pages_t, ibp_pages[npages]));
}
int
kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages)
int kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages)
{
kib_pages_t *p;
int i;
@ -1151,8 +1125,7 @@ kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages)
return 0;
}
void
kiblnd_unmap_rx_descs(kib_conn_t *conn)
void kiblnd_unmap_rx_descs(kib_conn_t *conn)
{
kib_rx_t *rx;
int i;
@ -1176,8 +1149,7 @@ kiblnd_unmap_rx_descs(kib_conn_t *conn)
conn->ibc_rx_pages = NULL;
}
void
kiblnd_map_rx_descs(kib_conn_t *conn)
void kiblnd_map_rx_descs(kib_conn_t *conn)
{
kib_rx_t *rx;
struct page *pg;
@ -1215,8 +1187,7 @@ kiblnd_map_rx_descs(kib_conn_t *conn)
}
}
static void
kiblnd_unmap_tx_pool(kib_tx_pool_t *tpo)
static void kiblnd_unmap_tx_pool(kib_tx_pool_t *tpo)
{
kib_hca_dev_t *hdev = tpo->tpo_hdev;
kib_tx_t *tx;
@ -1239,8 +1210,7 @@ kiblnd_unmap_tx_pool(kib_tx_pool_t *tpo)
tpo->tpo_hdev = NULL;
}
static kib_hca_dev_t *
kiblnd_current_hdev(kib_dev_t *dev)
static kib_hca_dev_t *kiblnd_current_hdev(kib_dev_t *dev)
{
kib_hca_dev_t *hdev;
unsigned long flags;
@ -1265,8 +1235,7 @@ kiblnd_current_hdev(kib_dev_t *dev)
return hdev;
}
static void
kiblnd_map_tx_pool(kib_tx_pool_t *tpo)
static void kiblnd_map_tx_pool(kib_tx_pool_t *tpo)
{
kib_pages_t *txpgs = tpo->tpo_tx_pages;
kib_pool_t *pool = &tpo->tpo_pool;
@ -1317,8 +1286,7 @@ kiblnd_map_tx_pool(kib_tx_pool_t *tpo)
}
}
struct ib_mr *
kiblnd_find_dma_mr(kib_hca_dev_t *hdev, __u64 addr, __u64 size)
struct ib_mr *kiblnd_find_dma_mr(kib_hca_dev_t *hdev, __u64 addr, __u64 size)
{
__u64 index;
@ -1336,8 +1304,7 @@ kiblnd_find_dma_mr(kib_hca_dev_t *hdev, __u64 addr, __u64 size)
return NULL;
}
struct ib_mr *
kiblnd_find_rd_dma_mr(kib_hca_dev_t *hdev, kib_rdma_desc_t *rd)
struct ib_mr *kiblnd_find_rd_dma_mr(kib_hca_dev_t *hdev, kib_rdma_desc_t *rd)
{
struct ib_mr *prev_mr;
struct ib_mr *mr;
@ -1370,8 +1337,7 @@ kiblnd_find_rd_dma_mr(kib_hca_dev_t *hdev, kib_rdma_desc_t *rd)
return mr;
}
static void
kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool)
static void kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool)
{
LASSERT(pool->fpo_map_count == 0);
@ -1384,8 +1350,7 @@ kiblnd_destroy_fmr_pool(kib_fmr_pool_t *pool)
LIBCFS_FREE(pool, sizeof(kib_fmr_pool_t));
}
static void
kiblnd_destroy_fmr_pool_list(struct list_head *head)
static void kiblnd_destroy_fmr_pool_list(struct list_head *head)
{
kib_fmr_pool_t *pool;
@ -1410,8 +1375,8 @@ static int kiblnd_fmr_flush_trigger(int ncpts)
return max(IBLND_FMR_POOL_FLUSH, size);
}
static int
kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t **pp_fpo)
static int kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps,
kib_fmr_pool_t **pp_fpo)
{
/* FMR pool for RDMA */
kib_dev_t *dev = fps->fps_net->ibn_dev;
@ -1451,8 +1416,8 @@ kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t **pp_fpo)
return 0;
}
static void
kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, struct list_head *zombies)
static void kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps,
struct list_head *zombies)
{
if (fps->fps_net == NULL) /* intialized? */
return;
@ -1473,8 +1438,7 @@ kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, struct list_head *zombies)
spin_unlock(&fps->fps_lock);
}
static void
kiblnd_fini_fmr_poolset(kib_fmr_poolset_t *fps)
static void kiblnd_fini_fmr_poolset(kib_fmr_poolset_t *fps)
{
if (fps->fps_net != NULL) { /* initialized? */
kiblnd_destroy_fmr_pool_list(&fps->fps_failed_pool_list);
@ -1482,8 +1446,7 @@ kiblnd_fini_fmr_poolset(kib_fmr_poolset_t *fps)
}
}
static int
kiblnd_init_fmr_poolset(kib_fmr_poolset_t *fps, int cpt, kib_net_t *net,
static int kiblnd_init_fmr_poolset(kib_fmr_poolset_t *fps, int cpt, kib_net_t *net,
int pool_size, int flush_trigger)
{
kib_fmr_pool_t *fpo;
@ -1506,8 +1469,7 @@ kiblnd_init_fmr_poolset(kib_fmr_poolset_t *fps, int cpt, kib_net_t *net,
return rc;
}
static int
kiblnd_fmr_pool_is_idle(kib_fmr_pool_t *fpo, unsigned long now)
static int kiblnd_fmr_pool_is_idle(kib_fmr_pool_t *fpo, unsigned long now)
{
if (fpo->fpo_map_count != 0) /* still in use */
return 0;
@ -1516,8 +1478,7 @@ kiblnd_fmr_pool_is_idle(kib_fmr_pool_t *fpo, unsigned long now)
return cfs_time_aftereq(now, fpo->fpo_deadline);
}
void
kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status)
void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status)
{
LIST_HEAD(zombies);
kib_fmr_pool_t *fpo = fmr->fmr_pool;
@ -1556,8 +1517,7 @@ kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status)
kiblnd_destroy_fmr_pool_list(&zombies);
}
int
kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,
int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,
__u64 iov, kib_fmr_t *fmr)
{
struct ib_pool_fmr *pfmr;
@ -1627,8 +1587,7 @@ kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,
goto again;
}
static void
kiblnd_fini_pool(kib_pool_t *pool)
static void kiblnd_fini_pool(kib_pool_t *pool)
{
LASSERT(list_empty(&pool->po_free_list));
LASSERT(pool->po_allocated == 0);
@ -1636,8 +1595,7 @@ kiblnd_fini_pool(kib_pool_t *pool)
CDEBUG(D_NET, "Finalize %s pool\n", pool->po_owner->ps_name);
}
static void
kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size)
static void kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size)
{
CDEBUG(D_NET, "Initialize %s pool\n", ps->ps_name);
@ -1648,8 +1606,7 @@ kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size)
pool->po_size = size;
}
static void
kiblnd_destroy_pool_list(struct list_head *head)
static void kiblnd_destroy_pool_list(struct list_head *head)
{
kib_pool_t *pool;
@ -1662,8 +1619,7 @@ kiblnd_destroy_pool_list(struct list_head *head)
}
}
static void
kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies)
static void kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies)
{
if (ps->ps_net == NULL) /* intialized? */
return;
@ -1682,8 +1638,7 @@ kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies)
spin_unlock(&ps->ps_lock);
}
static void
kiblnd_fini_poolset(kib_poolset_t *ps)
static void kiblnd_fini_poolset(kib_poolset_t *ps)
{
if (ps->ps_net != NULL) { /* initialized? */
kiblnd_destroy_pool_list(&ps->ps_failed_pool_list);
@ -1691,8 +1646,7 @@ kiblnd_fini_poolset(kib_poolset_t *ps)
}
}
static int
kiblnd_init_poolset(kib_poolset_t *ps, int cpt,
static int kiblnd_init_poolset(kib_poolset_t *ps, int cpt,
kib_net_t *net, char *name, int size,
kib_ps_pool_create_t po_create,
kib_ps_pool_destroy_t po_destroy,
@ -1727,8 +1681,7 @@ kiblnd_init_poolset(kib_poolset_t *ps, int cpt,
return rc;
}
static int
kiblnd_pool_is_idle(kib_pool_t *pool, unsigned long now)
static int kiblnd_pool_is_idle(kib_pool_t *pool, unsigned long now)
{
if (pool->po_allocated != 0) /* still in use */
return 0;
@ -1737,8 +1690,7 @@ kiblnd_pool_is_idle(kib_pool_t *pool, unsigned long now)
return cfs_time_aftereq(now, pool->po_deadline);
}
void
kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node)
void kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node)
{
LIST_HEAD(zombies);
kib_poolset_t *ps = pool->po_owner;
@ -1768,8 +1720,7 @@ kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node)
kiblnd_destroy_pool_list(&zombies);
}
struct list_head *
kiblnd_pool_alloc_node(kib_poolset_t *ps)
struct list_head *kiblnd_pool_alloc_node(kib_poolset_t *ps)
{
struct list_head *node;
kib_pool_t *pool;
@ -1831,8 +1782,7 @@ kiblnd_pool_alloc_node(kib_poolset_t *ps)
goto again;
}
void
kiblnd_pmr_pool_unmap(kib_phys_mr_t *pmr)
void kiblnd_pmr_pool_unmap(kib_phys_mr_t *pmr)
{
kib_pmr_pool_t *ppo = pmr->pmr_pool;
struct ib_mr *mr = pmr->pmr_mr;
@ -1843,8 +1793,7 @@ kiblnd_pmr_pool_unmap(kib_phys_mr_t *pmr)
ib_dereg_mr(mr);
}
int
kiblnd_pmr_pool_map(kib_pmr_poolset_t *pps, kib_hca_dev_t *hdev,
int kiblnd_pmr_pool_map(kib_pmr_poolset_t *pps, kib_hca_dev_t *hdev,
kib_rdma_desc_t *rd, __u64 *iova, kib_phys_mr_t **pp_pmr)
{
kib_phys_mr_t *pmr;
@ -1889,8 +1838,7 @@ kiblnd_pmr_pool_map(kib_pmr_poolset_t *pps, kib_hca_dev_t *hdev,
return rc;
}
static void
kiblnd_destroy_pmr_pool(kib_pool_t *pool)
static void kiblnd_destroy_pmr_pool(kib_pool_t *pool)
{
kib_pmr_pool_t *ppo = container_of(pool, kib_pmr_pool_t, ppo_pool);
kib_phys_mr_t *pmr;
@ -1927,8 +1875,8 @@ static inline int kiblnd_pmr_pool_size(int ncpts)
return max(IBLND_PMR_POOL, size);
}
static int
kiblnd_create_pmr_pool(kib_poolset_t *ps, int size, kib_pool_t **pp_po)
static int kiblnd_create_pmr_pool(kib_poolset_t *ps, int size,
kib_pool_t **pp_po)
{
struct kib_pmr_pool *ppo;
struct kib_pool *pool;
@ -1970,8 +1918,7 @@ kiblnd_create_pmr_pool(kib_poolset_t *ps, int size, kib_pool_t **pp_po)
return 0;
}
static void
kiblnd_destroy_tx_pool(kib_pool_t *pool)
static void kiblnd_destroy_tx_pool(kib_pool_t *pool)
{
kib_tx_pool_t *tpo = container_of(pool, kib_tx_pool_t, tpo_pool);
int i;
@ -2026,8 +1973,8 @@ static int kiblnd_tx_pool_size(int ncpts)
return max(IBLND_TX_POOL, ntx);
}
static int
kiblnd_create_tx_pool(kib_poolset_t *ps, int size, kib_pool_t **pp_po)
static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size,
kib_pool_t **pp_po)
{
int i;
int npg;
@ -2110,8 +2057,7 @@ kiblnd_create_tx_pool(kib_poolset_t *ps, int size, kib_pool_t **pp_po)
return -ENOMEM;
}
static void
kiblnd_tx_init(kib_pool_t *pool, struct list_head *node)
static void kiblnd_tx_init(kib_pool_t *pool, struct list_head *node)
{
kib_tx_poolset_t *tps = container_of(pool->po_owner, kib_tx_poolset_t,
tps_poolset);
@ -2120,8 +2066,7 @@ kiblnd_tx_init(kib_pool_t *pool, struct list_head *node)
tx->tx_cookie = tps->tps_next_tx_cookie++;
}
static void
kiblnd_net_fini_pools(kib_net_t *net)
static void kiblnd_net_fini_pools(kib_net_t *net)
{
int i;
@ -2162,8 +2107,7 @@ kiblnd_net_fini_pools(kib_net_t *net)
}
}
static int
kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
static int kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
{
unsigned long flags;
int cpt;
@ -2291,8 +2235,7 @@ kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
return rc;
}
static int
kiblnd_hdev_get_attr(kib_hca_dev_t *hdev)
static int kiblnd_hdev_get_attr(kib_hca_dev_t *hdev)
{
struct ib_device_attr *attr;
int rc;
@ -2336,8 +2279,7 @@ kiblnd_hdev_get_attr(kib_hca_dev_t *hdev)
return -EINVAL;
}
static void
kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev)
static void kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev)
{
int i;
@ -2356,8 +2298,7 @@ kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev)
hdev->ibh_nmrs = 0;
}
void
kiblnd_hdev_destroy(kib_hca_dev_t *hdev)
void kiblnd_hdev_destroy(kib_hca_dev_t *hdev)
{
kiblnd_hdev_cleanup_mrs(hdev);
@ -2370,8 +2311,7 @@ kiblnd_hdev_destroy(kib_hca_dev_t *hdev)
LIBCFS_FREE(hdev, sizeof(*hdev));
}
static int
kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
static int kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
{
struct ib_mr *mr;
int i;
@ -2454,14 +2394,13 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
return 0;
}
static int
kiblnd_dummy_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
{ /* DUMMY */
/* DUMMY */
static int kiblnd_dummy_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
{
return 0;
}
static int
kiblnd_dev_need_failover(kib_dev_t *dev)
static int kiblnd_dev_need_failover(kib_dev_t *dev)
{
struct rdma_cm_id *cmid;
struct sockaddr_in srcaddr;
@ -2516,8 +2455,7 @@ kiblnd_dev_need_failover(kib_dev_t *dev)
return 1;
}
int
kiblnd_dev_failover(kib_dev_t *dev)
int kiblnd_dev_failover(kib_dev_t *dev)
{
LIST_HEAD(zombie_tpo);
LIST_HEAD(zombie_ppo);
@ -2655,8 +2593,7 @@ kiblnd_dev_failover(kib_dev_t *dev)
return rc;
}
void
kiblnd_destroy_dev (kib_dev_t *dev)
void kiblnd_destroy_dev(kib_dev_t *dev)
{
LASSERT(dev->ibd_nnets == 0);
LASSERT(list_empty(&dev->ibd_nets));
@ -2670,8 +2607,7 @@ kiblnd_destroy_dev (kib_dev_t *dev)
LIBCFS_FREE(dev, sizeof(*dev));
}
static kib_dev_t *
kiblnd_create_dev(char *ifname)
static kib_dev_t *kiblnd_create_dev(char *ifname)
{
struct net_device *netdev;
kib_dev_t *dev;
@ -2723,8 +2659,7 @@ kiblnd_create_dev(char *ifname)
return dev;
}
static void
kiblnd_base_shutdown(void)
static void kiblnd_base_shutdown(void)
{
struct kib_sched_info *sched;
int i;
@ -2791,8 +2726,7 @@ kiblnd_base_shutdown(void)
module_put(THIS_MODULE);
}
void
kiblnd_shutdown (lnet_ni_t *ni)
void kiblnd_shutdown(lnet_ni_t *ni)
{
kib_net_t *net = ni->ni_data;
rwlock_t *g_lock = &kiblnd_data.kib_global_lock;
@ -2865,8 +2799,7 @@ kiblnd_shutdown (lnet_ni_t *ni)
return;
}
static int
kiblnd_base_startup(void)
static int kiblnd_base_startup(void)
{
struct kib_sched_info *sched;
int rc;
@ -2955,8 +2888,7 @@ kiblnd_base_startup(void)
return -ENETDOWN;
}
static int
kiblnd_start_schedulers(struct kib_sched_info *sched)
static int kiblnd_start_schedulers(struct kib_sched_info *sched)
{
int rc = 0;
int nthrs;
@ -2996,8 +2928,7 @@ kiblnd_start_schedulers(struct kib_sched_info *sched)
return rc;
}
static int
kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts)
static int kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts)
{
int cpt;
int rc;
@ -3022,8 +2953,7 @@ kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, int ncpts)
return 0;
}
static kib_dev_t *
kiblnd_dev_search(char *ifname)
static kib_dev_t *kiblnd_dev_search(char *ifname)
{
kib_dev_t *alias = NULL;
kib_dev_t *dev;
@ -3055,8 +2985,7 @@ kiblnd_dev_search(char *ifname)
return alias;
}
int
kiblnd_startup (lnet_ni_t *ni)
int kiblnd_startup(lnet_ni_t *ni)
{
char *ifname;
kib_dev_t *ibdev = NULL;
@ -3150,14 +3079,12 @@ kiblnd_startup (lnet_ni_t *ni)
return -ENETDOWN;
}
static void __exit
kiblnd_module_fini (void)
static void __exit kiblnd_module_fini(void)
{
lnet_unregister_lnd(&the_o2iblnd);
}
static int __init
kiblnd_module_init (void)
static int __init kiblnd_module_init(void)
{
int rc;