tipc: cleanup various cosmetic whitespace issues
Cleans up TIPC's source code to eliminate deviations from generally accepted coding conventions relating to leading/trailing white space and white space around commas, braces, cases, and sizeof. These changes are purely cosmetic and do not alter the operation of TIPC in any way. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
25860c3bd5
commit
0e65967e33
@ -137,7 +137,7 @@ static inline unsigned int tipc_node(__u32 addr)
|
||||
#define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */
|
||||
#endif
|
||||
|
||||
#define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */
|
||||
#define TIPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */
|
||||
|
||||
struct tipc_subscr {
|
||||
struct tipc_name_seq seq; /* name sequence of interest */
|
||||
|
@ -379,8 +379,7 @@ struct tipc_genlmsghdr {
|
||||
* that follows.
|
||||
*/
|
||||
|
||||
struct tipc_cfg_msg_hdr
|
||||
{
|
||||
struct tipc_cfg_msg_hdr {
|
||||
__be32 tcm_len; /* Message length (including header) */
|
||||
__be16 tcm_type; /* Command type */
|
||||
__be16 tcm_flags; /* Additional flags */
|
||||
|
@ -322,8 +322,7 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
|
||||
} else if (!tipc_remote_management) {
|
||||
rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NO_REMOTE);
|
||||
goto exit;
|
||||
}
|
||||
else if (cmd >= 0x4000) {
|
||||
} else if (cmd >= 0x4000) {
|
||||
u32 domain = 0;
|
||||
|
||||
if ((tipc_nametbl_translate(TIPC_ZM_SRV, 0, &domain) == 0) ||
|
||||
|
@ -155,7 +155,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
|
||||
|
||||
/* Find Ethernet bearer for device (or create one) */
|
||||
|
||||
for (;(eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev); eb_ptr++);
|
||||
while ((eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev))
|
||||
eb_ptr++;
|
||||
if (eb_ptr == stop)
|
||||
return -EDQUOT;
|
||||
if (!eb_ptr->dev) {
|
||||
|
@ -977,8 +977,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,
|
||||
l_ptr->next_out = buf;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
*used_max_pkt = l_ptr->max_pkt;
|
||||
}
|
||||
return tipc_link_send_buf(l_ptr, buf); /* All other cases */
|
||||
@ -1229,8 +1228,7 @@ error:
|
||||
fragm_crs = INT_H_SIZE;
|
||||
fragm_rest = fragm_sz;
|
||||
}
|
||||
}
|
||||
while (rest > 0);
|
||||
} while (rest > 0);
|
||||
|
||||
/*
|
||||
* Now we have a buffer chain. Select a link and check
|
||||
@ -1847,8 +1845,7 @@ u32 tipc_link_defer_pkt(struct sk_buff **head,
|
||||
}
|
||||
prev = crs;
|
||||
crs = crs->next;
|
||||
}
|
||||
while (crs);
|
||||
} while (crs);
|
||||
|
||||
/* Message is a duplicate of an existing message */
|
||||
|
||||
|
@ -620,8 +620,7 @@ static void port_print(struct port *p_ptr, struct print_buf *buf, int full_id)
|
||||
tipc_printf(buf, " via {%u,%u}",
|
||||
p_ptr->publ.conn_type,
|
||||
p_ptr->publ.conn_instance);
|
||||
}
|
||||
else if (p_ptr->publ.published) {
|
||||
} else if (p_ptr->publ.published) {
|
||||
tipc_printf(buf, " bound to");
|
||||
list_for_each_entry(publ, &p_ptr->publications, pport_list) {
|
||||
if (publ->lower == publ->upper)
|
||||
|
@ -178,14 +178,12 @@ u32 tipc_ref_acquire(void *object, spinlock_t **lock)
|
||||
next_plus_upper = entry->ref;
|
||||
tipc_ref_table.first_free = next_plus_upper & index_mask;
|
||||
ref = (next_plus_upper & ~index_mask) + index;
|
||||
}
|
||||
else if (tipc_ref_table.init_point < tipc_ref_table.capacity) {
|
||||
} else if (tipc_ref_table.init_point < tipc_ref_table.capacity) {
|
||||
index = tipc_ref_table.init_point++;
|
||||
entry = &(tipc_ref_table.entries[index]);
|
||||
spin_lock_init(&entry->lock);
|
||||
ref = tipc_ref_table.start_mask + index;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
ref = 0;
|
||||
}
|
||||
write_unlock_bh(&ref_table_lock);
|
||||
|
@ -570,14 +570,12 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
|
||||
dest->addr.name.domain,
|
||||
m->msg_iovlen,
|
||||
m->msg_iov);
|
||||
}
|
||||
else if (dest->addrtype == TIPC_ADDR_ID) {
|
||||
} else if (dest->addrtype == TIPC_ADDR_ID) {
|
||||
res = tipc_send2port(tport->ref,
|
||||
&dest->addr.id,
|
||||
m->msg_iovlen,
|
||||
m->msg_iov);
|
||||
}
|
||||
else if (dest->addrtype == TIPC_ADDR_MCAST) {
|
||||
} else if (dest->addrtype == TIPC_ADDR_MCAST) {
|
||||
if (needs_conn) {
|
||||
res = -EOPNOTSUPP;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user