mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 04:11:49 +00:00
staging: lustre: lnet: lnet: Remove space between function name and open paranthesis '('
This patch fixes checpatch.pl warning in api-ni.c file. WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2c1d2535db
commit
3b7566d9df
@ -176,7 +176,7 @@ lnet_create_locks(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static 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
|
||||
@ -184,93 +184,93 @@ static void lnet_assert_wire_constants (void)
|
||||
* with gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) */
|
||||
|
||||
/* Constants... */
|
||||
CLASSERT (LNET_PROTO_TCP_MAGIC == 0xeebc0ded);
|
||||
CLASSERT (LNET_PROTO_TCP_VERSION_MAJOR == 1);
|
||||
CLASSERT (LNET_PROTO_TCP_VERSION_MINOR == 0);
|
||||
CLASSERT (LNET_MSG_ACK == 0);
|
||||
CLASSERT (LNET_MSG_PUT == 1);
|
||||
CLASSERT (LNET_MSG_GET == 2);
|
||||
CLASSERT (LNET_MSG_REPLY == 3);
|
||||
CLASSERT (LNET_MSG_HELLO == 4);
|
||||
CLASSERT(LNET_PROTO_TCP_MAGIC == 0xeebc0ded);
|
||||
CLASSERT(LNET_PROTO_TCP_VERSION_MAJOR == 1);
|
||||
CLASSERT(LNET_PROTO_TCP_VERSION_MINOR == 0);
|
||||
CLASSERT(LNET_MSG_ACK == 0);
|
||||
CLASSERT(LNET_MSG_PUT == 1);
|
||||
CLASSERT(LNET_MSG_GET == 2);
|
||||
CLASSERT(LNET_MSG_REPLY == 3);
|
||||
CLASSERT(LNET_MSG_HELLO == 4);
|
||||
|
||||
/* Checks for struct ptl_handle_wire_t */
|
||||
CLASSERT ((int)sizeof(lnet_handle_wire_t) == 16);
|
||||
CLASSERT ((int)offsetof(lnet_handle_wire_t, wh_interface_cookie) == 0);
|
||||
CLASSERT ((int)sizeof(((lnet_handle_wire_t *)0)->wh_interface_cookie) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_handle_wire_t, wh_object_cookie) == 8);
|
||||
CLASSERT ((int)sizeof(((lnet_handle_wire_t *)0)->wh_object_cookie) == 8);
|
||||
CLASSERT((int)sizeof(lnet_handle_wire_t) == 16);
|
||||
CLASSERT((int)offsetof(lnet_handle_wire_t, wh_interface_cookie) == 0);
|
||||
CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_interface_cookie) == 8);
|
||||
CLASSERT((int)offsetof(lnet_handle_wire_t, wh_object_cookie) == 8);
|
||||
CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_object_cookie) == 8);
|
||||
|
||||
/* Checks for struct lnet_magicversion_t */
|
||||
CLASSERT ((int)sizeof(lnet_magicversion_t) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_magicversion_t, magic) == 0);
|
||||
CLASSERT ((int)sizeof(((lnet_magicversion_t *)0)->magic) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_magicversion_t, version_major) == 4);
|
||||
CLASSERT ((int)sizeof(((lnet_magicversion_t *)0)->version_major) == 2);
|
||||
CLASSERT ((int)offsetof(lnet_magicversion_t, version_minor) == 6);
|
||||
CLASSERT ((int)sizeof(((lnet_magicversion_t *)0)->version_minor) == 2);
|
||||
CLASSERT((int)sizeof(lnet_magicversion_t) == 8);
|
||||
CLASSERT((int)offsetof(lnet_magicversion_t, magic) == 0);
|
||||
CLASSERT((int)sizeof(((lnet_magicversion_t *)0)->magic) == 4);
|
||||
CLASSERT((int)offsetof(lnet_magicversion_t, version_major) == 4);
|
||||
CLASSERT((int)sizeof(((lnet_magicversion_t *)0)->version_major) == 2);
|
||||
CLASSERT((int)offsetof(lnet_magicversion_t, version_minor) == 6);
|
||||
CLASSERT((int)sizeof(((lnet_magicversion_t *)0)->version_minor) == 2);
|
||||
|
||||
/* Checks for struct lnet_hdr_t */
|
||||
CLASSERT ((int)sizeof(lnet_hdr_t) == 72);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, dest_nid) == 0);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->dest_nid) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, src_nid) == 8);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->src_nid) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, dest_pid) == 16);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->dest_pid) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, src_pid) == 20);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->src_pid) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, type) == 24);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->type) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, payload_length) == 28);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->payload_length) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg) == 40);
|
||||
CLASSERT((int)sizeof(lnet_hdr_t) == 72);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, dest_nid) == 0);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->dest_nid) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, src_nid) == 8);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->src_nid) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, dest_pid) == 16);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->dest_pid) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, src_pid) == 20);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->src_pid) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, type) == 24);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->type) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, payload_length) == 28);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->payload_length) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg) == 40);
|
||||
|
||||
/* Ack */
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.ack.dst_wmd) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.ack.dst_wmd) == 16);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.ack.match_bits) == 48);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.ack.match_bits) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.ack.mlength) == 56);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.ack.mlength) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.ack.dst_wmd) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.ack.dst_wmd) == 16);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.ack.match_bits) == 48);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.ack.match_bits) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.ack.mlength) == 56);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.ack.mlength) == 4);
|
||||
|
||||
/* Put */
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.put.ack_wmd) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.put.ack_wmd) == 16);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.put.match_bits) == 48);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.put.match_bits) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.put.hdr_data) == 56);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.put.hdr_data) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.put.ptl_index) == 64);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.put.ptl_index) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.put.offset) == 68);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.put.offset) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.put.ack_wmd) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.put.ack_wmd) == 16);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.put.match_bits) == 48);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.put.match_bits) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.put.hdr_data) == 56);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.put.hdr_data) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.put.ptl_index) == 64);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.put.ptl_index) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.put.offset) == 68);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.put.offset) == 4);
|
||||
|
||||
/* Get */
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.get.return_wmd) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.get.return_wmd) == 16);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.get.match_bits) == 48);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.get.match_bits) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.get.ptl_index) == 56);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.get.ptl_index) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.get.src_offset) == 60);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.get.src_offset) == 4);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.get.sink_length) == 64);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.get.sink_length) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.get.return_wmd) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.get.return_wmd) == 16);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.get.match_bits) == 48);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.get.match_bits) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.get.ptl_index) == 56);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.get.ptl_index) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.get.src_offset) == 60);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.get.src_offset) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.get.sink_length) == 64);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.get.sink_length) == 4);
|
||||
|
||||
/* Reply */
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.reply.dst_wmd) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.reply.dst_wmd) == 16);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.reply.dst_wmd) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.reply.dst_wmd) == 16);
|
||||
|
||||
/* Hello */
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.hello.incarnation) == 32);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.incarnation) == 8);
|
||||
CLASSERT ((int)offsetof(lnet_hdr_t, msg.hello.type) == 40);
|
||||
CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.hello.incarnation) == 32);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.hello.incarnation) == 8);
|
||||
CLASSERT((int)offsetof(lnet_hdr_t, msg.hello.type) == 40);
|
||||
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
|
||||
}
|
||||
|
||||
static lnd_t *
|
||||
lnet_find_lnd_by_type (int type)
|
||||
lnet_find_lnd_by_type(int type)
|
||||
{
|
||||
lnd_t *lnd;
|
||||
struct list_head *tmp;
|
||||
@ -287,15 +287,15 @@ lnet_find_lnd_by_type (int type)
|
||||
}
|
||||
|
||||
void
|
||||
lnet_register_lnd (lnd_t *lnd)
|
||||
lnet_register_lnd(lnd_t *lnd)
|
||||
{
|
||||
LNET_MUTEX_LOCK(&the_lnet.ln_lnd_mutex);
|
||||
|
||||
LASSERT (the_lnet.ln_init);
|
||||
LASSERT (libcfs_isknown_lnd(lnd->lnd_type));
|
||||
LASSERT (lnet_find_lnd_by_type(lnd->lnd_type) == NULL);
|
||||
LASSERT(the_lnet.ln_init);
|
||||
LASSERT(libcfs_isknown_lnd(lnd->lnd_type));
|
||||
LASSERT(lnet_find_lnd_by_type(lnd->lnd_type) == NULL);
|
||||
|
||||
list_add_tail (&lnd->lnd_list, &the_lnet.ln_lnds);
|
||||
list_add_tail(&lnd->lnd_list, &the_lnet.ln_lnds);
|
||||
lnd->lnd_refcount = 0;
|
||||
|
||||
CDEBUG(D_NET, "%s LND registered\n", libcfs_lnd2str(lnd->lnd_type));
|
||||
@ -305,15 +305,15 @@ lnet_register_lnd (lnd_t *lnd)
|
||||
EXPORT_SYMBOL(lnet_register_lnd);
|
||||
|
||||
void
|
||||
lnet_unregister_lnd (lnd_t *lnd)
|
||||
lnet_unregister_lnd(lnd_t *lnd)
|
||||
{
|
||||
LNET_MUTEX_LOCK(&the_lnet.ln_lnd_mutex);
|
||||
|
||||
LASSERT (the_lnet.ln_init);
|
||||
LASSERT (lnet_find_lnd_by_type(lnd->lnd_type) == lnd);
|
||||
LASSERT (lnd->lnd_refcount == 0);
|
||||
LASSERT(the_lnet.ln_init);
|
||||
LASSERT(lnet_find_lnd_by_type(lnd->lnd_type) == lnd);
|
||||
LASSERT(lnd->lnd_refcount == 0);
|
||||
|
||||
list_del (&lnd->lnd_list);
|
||||
list_del(&lnd->lnd_list);
|
||||
CDEBUG(D_NET, "%s LND unregistered\n", libcfs_lnd2str(lnd->lnd_type));
|
||||
|
||||
LNET_MUTEX_UNLOCK(&the_lnet.ln_lnd_mutex);
|
||||
@ -366,26 +366,26 @@ EXPORT_SYMBOL(lnet_counters_reset);
|
||||
#ifdef LNET_USE_LIB_FREELIST
|
||||
|
||||
int
|
||||
lnet_freelist_init (lnet_freelist_t *fl, int n, int size)
|
||||
lnet_freelist_init(lnet_freelist_t *fl, int n, int size)
|
||||
{
|
||||
char *space;
|
||||
|
||||
LASSERT (n > 0);
|
||||
LASSERT(n > 0);
|
||||
|
||||
size += offsetof (lnet_freeobj_t, fo_contents);
|
||||
size += offsetof(lnet_freeobj_t, fo_contents);
|
||||
|
||||
LIBCFS_ALLOC(space, n * size);
|
||||
if (space == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_LIST_HEAD (&fl->fl_list);
|
||||
INIT_LIST_HEAD(&fl->fl_list);
|
||||
fl->fl_objs = space;
|
||||
fl->fl_nobjs = n;
|
||||
fl->fl_objsize = size;
|
||||
|
||||
do {
|
||||
memset (space, 0, size);
|
||||
list_add ((struct list_head *)space, &fl->fl_list);
|
||||
memset(space, 0, size);
|
||||
list_add((struct list_head *)space, &fl->fl_list);
|
||||
space += size;
|
||||
} while (--n != 0);
|
||||
|
||||
@ -393,7 +393,7 @@ lnet_freelist_init (lnet_freelist_t *fl, int n, int size)
|
||||
}
|
||||
|
||||
void
|
||||
lnet_freelist_fini (lnet_freelist_t *fl)
|
||||
lnet_freelist_fini(lnet_freelist_t *fl)
|
||||
{
|
||||
struct list_head *el;
|
||||
int count;
|
||||
@ -405,16 +405,16 @@ lnet_freelist_fini (lnet_freelist_t *fl)
|
||||
for (el = fl->fl_list.next; el != &fl->fl_list; el = el->next)
|
||||
count++;
|
||||
|
||||
LASSERT (count == fl->fl_nobjs);
|
||||
LASSERT(count == fl->fl_nobjs);
|
||||
|
||||
LIBCFS_FREE(fl->fl_objs, fl->fl_nobjs * fl->fl_objsize);
|
||||
memset (fl, 0, sizeof (*fl));
|
||||
memset(fl, 0, sizeof(*fl));
|
||||
}
|
||||
|
||||
#endif /* LNET_USE_LIB_FREELIST */
|
||||
|
||||
static __u64
|
||||
lnet_create_interface_cookie (void)
|
||||
lnet_create_interface_cookie(void)
|
||||
{
|
||||
/* NB the interface cookie in wire handles guards against delayed
|
||||
* replies and ACKs appearing valid after reboot. Initialisation time,
|
||||
@ -614,11 +614,11 @@ lnet_prepare(lnet_pid_t requested_pid)
|
||||
struct lnet_res_container **recs;
|
||||
int rc = 0;
|
||||
|
||||
LASSERT (the_lnet.ln_refcount == 0);
|
||||
LASSERT(the_lnet.ln_refcount == 0);
|
||||
|
||||
the_lnet.ln_routing = 0;
|
||||
|
||||
LASSERT ((requested_pid & LNET_PID_USERFLAG) == 0);
|
||||
LASSERT((requested_pid & LNET_PID_USERFLAG) == 0);
|
||||
the_lnet.ln_pid = requested_pid;
|
||||
|
||||
INIT_LIST_HEAD(&the_lnet.ln_test_peers);
|
||||
@ -683,7 +683,7 @@ lnet_prepare(lnet_pid_t requested_pid)
|
||||
}
|
||||
|
||||
int
|
||||
lnet_unprepare (void)
|
||||
lnet_unprepare(void)
|
||||
{
|
||||
/* NB no LNET_LOCK since this is the last reference. All LND instances
|
||||
* have shut down already, so it is safe to unlink and free all
|
||||
@ -874,7 +874,7 @@ lnet_islocalnid(lnet_nid_t nid)
|
||||
}
|
||||
|
||||
int
|
||||
lnet_count_acceptor_nis (void)
|
||||
lnet_count_acceptor_nis(void)
|
||||
{
|
||||
/* Return the # of NIs that need the acceptor. */
|
||||
int count = 0;
|
||||
@ -913,7 +913,7 @@ lnet_ni_tq_credits(lnet_ni_t *ni)
|
||||
}
|
||||
|
||||
static void
|
||||
lnet_shutdown_lndnis (void)
|
||||
lnet_shutdown_lndnis(void)
|
||||
{
|
||||
int i;
|
||||
int islo;
|
||||
@ -1003,7 +1003,7 @@ lnet_shutdown_lndnis (void)
|
||||
|
||||
islo = ni->ni_lnd->lnd_type == LOLND;
|
||||
|
||||
LASSERT (!in_interrupt ());
|
||||
LASSERT(!in_interrupt());
|
||||
(ni->ni_lnd->lnd_shutdown)(ni);
|
||||
|
||||
/* can't deref lnd anymore now; it might have unregistered
|
||||
@ -1030,7 +1030,7 @@ lnet_shutdown_lndnis (void)
|
||||
}
|
||||
|
||||
static int
|
||||
lnet_startup_lndnis (void)
|
||||
lnet_startup_lndnis(void)
|
||||
{
|
||||
lnd_t *lnd;
|
||||
struct lnet_ni *ni;
|
||||
@ -1055,7 +1055,7 @@ lnet_startup_lndnis (void)
|
||||
ni = list_entry(nilist.next, lnet_ni_t, ni_list);
|
||||
lnd_type = LNET_NETTYP(LNET_NIDNET(ni->ni_nid));
|
||||
|
||||
LASSERT (libcfs_isknown_lnd(lnd_type));
|
||||
LASSERT(libcfs_isknown_lnd(lnd_type));
|
||||
|
||||
if (lnd_type == CIBLND ||
|
||||
lnd_type == OPENIBLND ||
|
||||
@ -1104,7 +1104,7 @@ lnet_startup_lndnis (void)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
LASSERT (ni->ni_peertimeout <= 0 || lnd->lnd_query != NULL);
|
||||
LASSERT(ni->ni_peertimeout <= 0 || lnd->lnd_query != NULL);
|
||||
|
||||
list_del(&ni->ni_list);
|
||||
|
||||
@ -1122,7 +1122,7 @@ lnet_startup_lndnis (void)
|
||||
|
||||
if (lnd->lnd_type == LOLND) {
|
||||
lnet_ni_addref(ni);
|
||||
LASSERT (the_lnet.ln_loni == NULL);
|
||||
LASSERT(the_lnet.ln_loni == NULL);
|
||||
the_lnet.ln_loni = ni;
|
||||
continue;
|
||||
}
|
||||
@ -1285,7 +1285,7 @@ LNetNIInit(lnet_pid_t requested_pid)
|
||||
|
||||
LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
|
||||
|
||||
LASSERT (the_lnet.ln_init);
|
||||
LASSERT(the_lnet.ln_init);
|
||||
CDEBUG(D_OTHER, "refs %d\n", the_lnet.ln_refcount);
|
||||
|
||||
if (the_lnet.ln_refcount > 0) {
|
||||
@ -1352,7 +1352,7 @@ LNetNIInit(lnet_pid_t requested_pid)
|
||||
failed1:
|
||||
lnet_unprepare();
|
||||
failed0:
|
||||
LASSERT (rc < 0);
|
||||
LASSERT(rc < 0);
|
||||
out:
|
||||
LNET_MUTEX_UNLOCK(&the_lnet.ln_api_mutex);
|
||||
return rc;
|
||||
@ -1373,13 +1373,13 @@ LNetNIFini(void)
|
||||
{
|
||||
LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
|
||||
|
||||
LASSERT (the_lnet.ln_init);
|
||||
LASSERT (the_lnet.ln_refcount > 0);
|
||||
LASSERT(the_lnet.ln_init);
|
||||
LASSERT(the_lnet.ln_refcount > 0);
|
||||
|
||||
if (the_lnet.ln_refcount != 1) {
|
||||
the_lnet.ln_refcount--;
|
||||
} else {
|
||||
LASSERT (!the_lnet.ln_niinit_self);
|
||||
LASSERT(!the_lnet.ln_niinit_self);
|
||||
|
||||
lnet_proc_fini();
|
||||
lnet_router_checker_stop();
|
||||
@ -1420,8 +1420,8 @@ LNetCtl(unsigned int cmd, void *arg)
|
||||
lnet_ni_t *ni;
|
||||
int rc;
|
||||
|
||||
LASSERT (the_lnet.ln_init);
|
||||
LASSERT (the_lnet.ln_refcount > 0);
|
||||
LASSERT(the_lnet.ln_init);
|
||||
LASSERT(the_lnet.ln_refcount > 0);
|
||||
|
||||
switch (cmd) {
|
||||
case IOC_LIBCFS_GET_NI:
|
||||
@ -1591,7 +1591,7 @@ lnet_create_ping_info(void)
|
||||
if (rc == -ENOENT)
|
||||
break;
|
||||
|
||||
LASSERT (rc == 0);
|
||||
LASSERT(rc == 0);
|
||||
}
|
||||
|
||||
infosz = offsetof(lnet_ping_info_t, pi_ni[n]);
|
||||
@ -1610,7 +1610,7 @@ lnet_create_ping_info(void)
|
||||
lnet_ni_status_t *ns = &pinfo->pi_ni[i];
|
||||
|
||||
rc = LNetGetId(i, &id);
|
||||
LASSERT (rc == 0);
|
||||
LASSERT(rc == 0);
|
||||
|
||||
ns->ns_nid = id.nid;
|
||||
ns->ns_status = LNET_NI_STATUS_UP;
|
||||
@ -1714,10 +1714,10 @@ lnet_ping_target_init(void)
|
||||
|
||||
failed_2:
|
||||
rc2 = LNetMEUnlink(meh);
|
||||
LASSERT (rc2 == 0);
|
||||
LASSERT(rc2 == 0);
|
||||
failed_1:
|
||||
rc2 = LNetEQFree(the_lnet.ln_ping_target_eq);
|
||||
LASSERT (rc2 == 0);
|
||||
LASSERT(rc2 == 0);
|
||||
failed_0:
|
||||
lnet_destroy_ping_info();
|
||||
return rc;
|
||||
@ -1740,7 +1740,7 @@ lnet_ping_target_fini(void)
|
||||
timeout_ms, &event, &which);
|
||||
|
||||
/* I expect overflow... */
|
||||
LASSERT (rc >= 0 || rc == -EOVERFLOW);
|
||||
LASSERT(rc >= 0 || rc == -EOVERFLOW);
|
||||
|
||||
if (rc == 0) {
|
||||
/* timed out: provide a diagnostic */
|
||||
@ -1755,13 +1755,13 @@ lnet_ping_target_fini(void)
|
||||
}
|
||||
|
||||
rc = LNetEQFree(the_lnet.ln_ping_target_eq);
|
||||
LASSERT (rc == 0);
|
||||
LASSERT(rc == 0);
|
||||
lnet_destroy_ping_info();
|
||||
cfs_restore_sigs(blocked);
|
||||
}
|
||||
|
||||
int
|
||||
lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_ids)
|
||||
lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_ids)
|
||||
{
|
||||
lnet_handle_eq_t eqh;
|
||||
lnet_handle_md_t mdh;
|
||||
@ -1823,7 +1823,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_i
|
||||
/* Don't CERROR; this could be deliberate! */
|
||||
|
||||
rc2 = LNetMDUnlink(mdh);
|
||||
LASSERT (rc2 == 0);
|
||||
LASSERT(rc2 == 0);
|
||||
|
||||
/* NB must wait for the UNLINK event below... */
|
||||
unlinked = 1;
|
||||
@ -1845,7 +1845,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_i
|
||||
(rc2 <= 0) ? -1 : event.status,
|
||||
(rc2 > 0 && event.unlinked) ? " unlinked" : "");
|
||||
|
||||
LASSERT (rc2 != -EOVERFLOW); /* can't miss anything */
|
||||
LASSERT(rc2 != -EOVERFLOW); /* can't miss anything */
|
||||
|
||||
if (rc2 <= 0 || event.status != 0) {
|
||||
/* timeout or error */
|
||||
@ -1881,7 +1881,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_i
|
||||
}
|
||||
|
||||
nob = rc;
|
||||
LASSERT (nob >= 0 && nob <= infosz);
|
||||
LASSERT(nob >= 0 && nob <= infosz);
|
||||
|
||||
rc = -EPROTO; /* if I can't parse... */
|
||||
|
||||
@ -1936,7 +1936,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_i
|
||||
rc2 = LNetEQFree(eqh);
|
||||
if (rc2 != 0)
|
||||
CERROR("rc2 %d\n", rc2);
|
||||
LASSERT (rc2 == 0);
|
||||
LASSERT(rc2 == 0);
|
||||
|
||||
out_0:
|
||||
LIBCFS_FREE(info, infosz);
|
||||
|
Loading…
Reference in New Issue
Block a user