Commit 24edbe4f authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman

Staging: lustre: Fix space prohibited between function and open paranthesis

This patch fixes the following checkpatch.pl warning in
lnet/lnet/config.c-
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13a7e2cf
...@@ -65,7 +65,7 @@ lnet_syntax(char *name, char *str, int offset, int width) ...@@ -65,7 +65,7 @@ lnet_syntax(char *name, char *str, int offset, int width)
} }
int int
lnet_issep (char c) lnet_issep(char c)
{ {
switch (c) { switch (c) {
case '\n': case '\n':
...@@ -83,7 +83,7 @@ lnet_net_unique(__u32 net, struct list_head *nilist) ...@@ -83,7 +83,7 @@ lnet_net_unique(__u32 net, struct list_head *nilist)
struct list_head *tmp; struct list_head *tmp;
lnet_ni_t *ni; lnet_ni_t *ni;
list_for_each (tmp, nilist) { list_for_each(tmp, nilist) {
ni = list_entry(tmp, lnet_ni_t, ni_list); ni = list_entry(tmp, lnet_ni_t, ni_list);
if (LNET_NIDNET(ni->ni_nid) == net) if (LNET_NIDNET(ni->ni_nid) == net)
...@@ -201,7 +201,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) ...@@ -201,7 +201,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks)
the_lnet.ln_network_tokens = tokens; the_lnet.ln_network_tokens = tokens;
the_lnet.ln_network_tokens_nob = tokensize; the_lnet.ln_network_tokens_nob = tokensize;
memcpy (tokens, networks, tokensize); memcpy(tokens, networks, tokensize);
str = tmp = tokens; str = tmp = tokens;
/* Add in the loopback network */ /* Add in the loopback network */
...@@ -366,7 +366,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) ...@@ -366,7 +366,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks)
} }
lnet_text_buf_t * lnet_text_buf_t *
lnet_new_text_buf (int str_len) lnet_new_text_buf(int str_len)
{ {
lnet_text_buf_t *ltb; lnet_text_buf_t *ltb;
int nob; int nob;
...@@ -395,7 +395,7 @@ lnet_new_text_buf (int str_len) ...@@ -395,7 +395,7 @@ lnet_new_text_buf (int str_len)
} }
void void
lnet_free_text_buf (lnet_text_buf_t *ltb) lnet_free_text_buf(lnet_text_buf_t *ltb)
{ {
lnet_tbnob -= ltb->ltb_size; lnet_tbnob -= ltb->ltb_size;
LIBCFS_FREE(ltb, ltb->ltb_size); LIBCFS_FREE(ltb, ltb->ltb_size);
...@@ -420,7 +420,7 @@ lnet_print_text_bufs(struct list_head *tbs) ...@@ -420,7 +420,7 @@ lnet_print_text_bufs(struct list_head *tbs)
struct list_head *tmp; struct list_head *tmp;
lnet_text_buf_t *ltb; lnet_text_buf_t *ltb;
list_for_each (tmp, tbs) { list_for_each(tmp, tbs) {
ltb = list_entry(tmp, lnet_text_buf_t, ltb_list); ltb = list_entry(tmp, lnet_text_buf_t, ltb_list);
CDEBUG(D_WARNING, "%s\n", ltb->ltb_text); CDEBUG(D_WARNING, "%s\n", ltb->ltb_text);
...@@ -430,7 +430,7 @@ lnet_print_text_bufs(struct list_head *tbs) ...@@ -430,7 +430,7 @@ lnet_print_text_bufs(struct list_head *tbs)
} }
int int
lnet_str2tbs_sep (struct list_head *tbs, char *str) lnet_str2tbs_sep(struct list_head *tbs, char *str)
{ {
struct list_head pending; struct list_head pending;
char *sep; char *sep;
...@@ -488,7 +488,7 @@ lnet_str2tbs_sep (struct list_head *tbs, char *str) ...@@ -488,7 +488,7 @@ lnet_str2tbs_sep (struct list_head *tbs, char *str)
} }
int int
lnet_expand1tb (struct list_head *list, lnet_expand1tb(struct list_head *list,
char *str, char *sep1, char *sep2, char *str, char *sep1, char *sep2,
char *item, int itemlen) char *item, int itemlen)
{ {
...@@ -496,8 +496,8 @@ lnet_expand1tb (struct list_head *list, ...@@ -496,8 +496,8 @@ lnet_expand1tb (struct list_head *list,
int len2 = strlen(sep2 + 1); int len2 = strlen(sep2 + 1);
lnet_text_buf_t *ltb; lnet_text_buf_t *ltb;
LASSERT (*sep1 == '['); LASSERT(*sep1 == '[');
LASSERT (*sep2 == ']'); LASSERT(*sep2 == ']');
ltb = lnet_new_text_buf(len1 + itemlen + len2); ltb = lnet_new_text_buf(len1 + itemlen + len2);
if (ltb == NULL) if (ltb == NULL)
...@@ -513,7 +513,7 @@ lnet_expand1tb (struct list_head *list, ...@@ -513,7 +513,7 @@ lnet_expand1tb (struct list_head *list,
} }
int int
lnet_str2tbs_expand (struct list_head *tbs, char *str) lnet_str2tbs_expand(struct list_head *tbs, char *str)
{ {
char num[16]; char num[16];
struct list_head pending; struct list_head pending;
...@@ -593,7 +593,7 @@ lnet_str2tbs_expand (struct list_head *tbs, char *str) ...@@ -593,7 +593,7 @@ lnet_str2tbs_expand (struct list_head *tbs, char *str)
} }
int int
lnet_parse_hops (char *str, unsigned int *hops) lnet_parse_hops(char *str, unsigned int *hops)
{ {
int len = strlen(str); int len = strlen(str);
int nob = len; int nob = len;
...@@ -605,7 +605,7 @@ lnet_parse_hops (char *str, unsigned int *hops) ...@@ -605,7 +605,7 @@ lnet_parse_hops (char *str, unsigned int *hops)
int int
lnet_parse_route (char *str, int *im_a_router) lnet_parse_route(char *str, int *im_a_router)
{ {
/* static scratch buffer OK (single threaded) */ /* static scratch buffer OK (single threaded) */
static char cmd[LNET_SINGLE_TEXTBUF_NOB]; static char cmd[LNET_SINGLE_TEXTBUF_NOB];
...@@ -702,25 +702,25 @@ lnet_parse_route (char *str, int *im_a_router) ...@@ -702,25 +702,25 @@ lnet_parse_route (char *str, int *im_a_router)
if (!got_hops) if (!got_hops)
hops = 1; hops = 1;
LASSERT (!list_empty(&nets)); LASSERT(!list_empty(&nets));
LASSERT (!list_empty(&gateways)); LASSERT(!list_empty(&gateways));
list_for_each (tmp1, &nets) { list_for_each(tmp1, &nets) {
ltb = list_entry(tmp1, lnet_text_buf_t, ltb_list); ltb = list_entry(tmp1, lnet_text_buf_t, ltb_list);
net = libcfs_str2net(ltb->ltb_text); net = libcfs_str2net(ltb->ltb_text);
LASSERT (net != LNET_NIDNET(LNET_NID_ANY)); LASSERT(net != LNET_NIDNET(LNET_NID_ANY));
list_for_each (tmp2, &gateways) { list_for_each(tmp2, &gateways) {
ltb = list_entry(tmp2, lnet_text_buf_t, ltb_list); ltb = list_entry(tmp2, lnet_text_buf_t, ltb_list);
nid = libcfs_str2nid(ltb->ltb_text); nid = libcfs_str2nid(ltb->ltb_text);
LASSERT (nid != LNET_NID_ANY); LASSERT(nid != LNET_NID_ANY);
if (lnet_islocalnid(nid)) { if (lnet_islocalnid(nid)) {
*im_a_router = 1; *im_a_router = 1;
continue; continue;
} }
rc = lnet_add_route (net, hops, nid); rc = lnet_add_route(net, hops, nid);
if (rc != 0) { if (rc != 0) {
CERROR("Can't create route " CERROR("Can't create route "
"to %s via %s\n", "to %s via %s\n",
...@@ -763,7 +763,7 @@ lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router) ...@@ -763,7 +763,7 @@ lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router)
} }
int int
lnet_parse_routes (char *routes, int *im_a_router) lnet_parse_routes(char *routes, int *im_a_router)
{ {
struct list_head tbs; struct list_head tbs;
int rc = 0; int rc = 0;
...@@ -779,14 +779,14 @@ lnet_parse_routes (char *routes, int *im_a_router) ...@@ -779,14 +779,14 @@ lnet_parse_routes (char *routes, int *im_a_router)
rc = lnet_parse_route_tbs(&tbs, im_a_router); rc = lnet_parse_route_tbs(&tbs, im_a_router);
} }
LASSERT (lnet_tbnob == 0); LASSERT(lnet_tbnob == 0);
return rc; return rc;
} }
int int
lnet_match_network_token(char *token, int len, __u32 *ipaddrs, int nip) lnet_match_network_token(char *token, int len, __u32 *ipaddrs, int nip)
{ {
LIST_HEAD (list); LIST_HEAD(list);
int rc; int rc;
int i; int i;
...@@ -815,7 +815,7 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip) ...@@ -815,7 +815,7 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip)
char *token; char *token;
int rc; int rc;
LASSERT (strlen(net_entry) < sizeof(tokens)); LASSERT(strlen(net_entry) < sizeof(tokens));
/* work on a copy of the string */ /* work on a copy of the string */
strcpy(tokens, net_entry); strcpy(tokens, net_entry);
...@@ -889,8 +889,8 @@ lnet_splitnets(char *source, struct list_head *nets) ...@@ -889,8 +889,8 @@ lnet_splitnets(char *source, struct list_head *nets)
char *bracket; char *bracket;
__u32 net; __u32 net;
LASSERT (!list_empty(nets)); LASSERT(!list_empty(nets));
LASSERT (nets->next == nets->prev); /* single entry */ LASSERT(nets->next == nets->prev); /* single entry */
tb = list_entry(nets->next, lnet_text_buf_t, ltb_list); tb = list_entry(nets->next, lnet_text_buf_t, ltb_list);
...@@ -957,7 +957,7 @@ lnet_splitnets(char *source, struct list_head *nets) ...@@ -957,7 +957,7 @@ lnet_splitnets(char *source, struct list_head *nets)
} }
int int
lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
{ {
static char networks[LNET_SINGLE_TEXTBUF_NOB]; static char networks[LNET_SINGLE_TEXTBUF_NOB];
static char source[LNET_SINGLE_TEXTBUF_NOB]; static char source[LNET_SINGLE_TEXTBUF_NOB];
...@@ -979,7 +979,7 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) ...@@ -979,7 +979,7 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
INIT_LIST_HEAD(&raw_entries); INIT_LIST_HEAD(&raw_entries);
if (lnet_str2tbs_sep(&raw_entries, ip2nets) < 0) { if (lnet_str2tbs_sep(&raw_entries, ip2nets) < 0) {
CERROR("Error parsing ip2nets\n"); CERROR("Error parsing ip2nets\n");
LASSERT (lnet_tbnob == 0); LASSERT(lnet_tbnob == 0);
return -EINVAL; return -EINVAL;
} }
...@@ -1017,16 +1017,16 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) ...@@ -1017,16 +1017,16 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
break; break;
dup = 0; dup = 0;
list_for_each (t, &current_nets) { list_for_each(t, &current_nets) {
tb = list_entry(t, lnet_text_buf_t, ltb_list); tb = list_entry(t, lnet_text_buf_t, ltb_list);
net1 = lnet_netspec2net(tb->ltb_text); net1 = lnet_netspec2net(tb->ltb_text);
LASSERT (net1 != LNET_NIDNET(LNET_NID_ANY)); LASSERT(net1 != LNET_NIDNET(LNET_NID_ANY));
list_for_each(t2, &matched_nets) { list_for_each(t2, &matched_nets) {
tb2 = list_entry(t2, lnet_text_buf_t, tb2 = list_entry(t2, lnet_text_buf_t,
ltb_list); ltb_list);
net2 = lnet_netspec2net(tb2->ltb_text); net2 = lnet_netspec2net(tb2->ltb_text);
LASSERT (net2 != LNET_NIDNET(LNET_NID_ANY)); LASSERT(net2 != LNET_NIDNET(LNET_NID_ANY));
if (net1 == net2) { if (net1 == net2) {
dup = 1; dup = 1;
...@@ -1067,7 +1067,7 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) ...@@ -1067,7 +1067,7 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
lnet_free_text_bufs(&raw_entries); lnet_free_text_bufs(&raw_entries);
lnet_free_text_bufs(&matched_nets); lnet_free_text_bufs(&matched_nets);
lnet_free_text_bufs(&current_nets); lnet_free_text_bufs(&current_nets);
LASSERT (lnet_tbnob == 0); LASSERT(lnet_tbnob == 0);
if (rc < 0) if (rc < 0)
return rc; return rc;
...@@ -1083,7 +1083,7 @@ lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip) ...@@ -1083,7 +1083,7 @@ lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip)
} }
int int
lnet_ipaddr_enumerate (__u32 **ipaddrsp) lnet_ipaddr_enumerate(__u32 **ipaddrsp)
{ {
int up; int up;
__u32 netmask; __u32 netmask;
...@@ -1149,7 +1149,7 @@ lnet_ipaddr_enumerate (__u32 **ipaddrsp) ...@@ -1149,7 +1149,7 @@ lnet_ipaddr_enumerate (__u32 **ipaddrsp)
} }
int int
lnet_parse_ip2nets (char **networksp, char *ip2nets) lnet_parse_ip2nets(char **networksp, char *ip2nets)
{ {
__u32 *ipaddrs; __u32 *ipaddrs;
int nip = lnet_ipaddr_enumerate(&ipaddrs); int nip = lnet_ipaddr_enumerate(&ipaddrs);
...@@ -1185,7 +1185,7 @@ lnet_parse_ip2nets (char **networksp, char *ip2nets) ...@@ -1185,7 +1185,7 @@ lnet_parse_ip2nets (char **networksp, char *ip2nets)
} }
int int
lnet_set_ip_niaddr (lnet_ni_t *ni) lnet_set_ip_niaddr(lnet_ni_t *ni)
{ {
__u32 net = LNET_NIDNET(ni->ni_nid); __u32 net = LNET_NIDNET(ni->ni_nid);
char **names; char **names;
...@@ -1201,7 +1201,7 @@ lnet_set_ip_niaddr (lnet_ni_t *ni) ...@@ -1201,7 +1201,7 @@ lnet_set_ip_niaddr (lnet_ni_t *ni)
if (ni->ni_interfaces[0] != NULL) { if (ni->ni_interfaces[0] != NULL) {
CLASSERT (LNET_MAX_INTERFACES > 1); CLASSERT(LNET_MAX_INTERFACES > 1);
if (ni->ni_interfaces[1] != NULL) { if (ni->ni_interfaces[1] != NULL) {
CERROR("Net %s doesn't support multiple interfaces\n", CERROR("Net %s doesn't support multiple interfaces\n",
......
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