aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:57 -0500
commita016892cd6eb8d3dd9769021b088917ac7371abd (patch)
tree7176a3754a1b26b9a4703984d7a0ccf4e320e4ee /net/tipc/link.c
parente3ec9c7d5eea9adf2c604c623c987360cc700b88 (diff)
tipc: remove extraneous braces from single statements
Cleans up TIPC's source code to eliminate the presence of unnecessary use of {} around single statements. 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>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index de9d49108d4..18702f58d11 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -615,9 +615,8 @@ static void link_state_event(struct link *l_ptr, unsigned event)
615 return; /* Not yet. */ 615 return; /* Not yet. */
616 616
617 if (link_blocked(l_ptr)) { 617 if (link_blocked(l_ptr)) {
618 if (event == TIMEOUT_EVT) { 618 if (event == TIMEOUT_EVT)
619 link_set_timer(l_ptr, cont_intv); 619 link_set_timer(l_ptr, cont_intv);
620 }
621 return; /* Changeover going on */ 620 return; /* Changeover going on */
622 } 621 }
623 622
@@ -940,11 +939,10 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
940 if (n_ptr) { 939 if (n_ptr) {
941 tipc_node_lock(n_ptr); 940 tipc_node_lock(n_ptr);
942 l_ptr = n_ptr->active_links[selector & 1]; 941 l_ptr = n_ptr->active_links[selector & 1];
943 if (l_ptr) { 942 if (l_ptr)
944 res = tipc_link_send_buf(l_ptr, buf); 943 res = tipc_link_send_buf(l_ptr, buf);
945 } else { 944 else
946 buf_discard(buf); 945 buf_discard(buf);
947 }
948 tipc_node_unlock(n_ptr); 946 tipc_node_unlock(n_ptr);
949 } else { 947 } else {
950 buf_discard(buf); 948 buf_discard(buf);
@@ -1626,9 +1624,8 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
1626 1624
1627 /* Ensure message data is a single contiguous unit */ 1625 /* Ensure message data is a single contiguous unit */
1628 1626
1629 if (unlikely(buf_linearize(buf))) { 1627 if (unlikely(buf_linearize(buf)))
1630 goto cont; 1628 goto cont;
1631 }
1632 1629
1633 /* Handle arrival of a non-unicast link message */ 1630 /* Handle arrival of a non-unicast link message */
1634 1631
@@ -1843,9 +1840,8 @@ u32 tipc_link_defer_pkt(struct sk_buff **head,
1843 *head = buf; 1840 *head = buf;
1844 return 1; 1841 return 1;
1845 } 1842 }
1846 if (seq_no == msg_seqno(msg)) { 1843 if (seq_no == msg_seqno(msg))
1847 break; 1844 break;
1848 }
1849 prev = crs; 1845 prev = crs;
1850 crs = crs->next; 1846 crs = crs->next;
1851 } while (crs); 1847 } while (crs);
@@ -1959,11 +1955,10 @@ void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg,
1959 msg_set_max_pkt(msg, l_ptr->max_pkt_target); 1955 msg_set_max_pkt(msg, l_ptr->max_pkt_target);
1960 } 1956 }
1961 1957
1962 if (tipc_node_has_redundant_links(l_ptr->owner)) { 1958 if (tipc_node_has_redundant_links(l_ptr->owner))
1963 msg_set_redundant_link(msg); 1959 msg_set_redundant_link(msg);
1964 } else { 1960 else
1965 msg_clear_redundant_link(msg); 1961 msg_clear_redundant_link(msg);
1966 }
1967 msg_set_linkprio(msg, l_ptr->priority); 1962 msg_set_linkprio(msg, l_ptr->priority);
1968 1963
1969 /* Ensure sequence number will not fit : */ 1964 /* Ensure sequence number will not fit : */
@@ -2071,9 +2066,8 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf)
2071 l_ptr->peer_bearer_id = msg_bearer_id(msg); 2066 l_ptr->peer_bearer_id = msg_bearer_id(msg);
2072 2067
2073 /* Synchronize broadcast sequence numbers */ 2068 /* Synchronize broadcast sequence numbers */
2074 if (!tipc_node_has_redundant_links(l_ptr->owner)) { 2069 if (!tipc_node_has_redundant_links(l_ptr->owner))
2075 l_ptr->owner->bclink.last_in = mod(msg_last_bcast(msg)); 2070 l_ptr->owner->bclink.last_in = mod(msg_last_bcast(msg));
2076 }
2077 break; 2071 break;
2078 case STATE_MSG: 2072 case STATE_MSG:
2079 2073
@@ -2108,9 +2102,8 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf)
2108 max_pkt_ack = 0; 2102 max_pkt_ack = 0;
2109 if (msg_probe(msg)) { 2103 if (msg_probe(msg)) {
2110 l_ptr->stats.recv_probes++; 2104 l_ptr->stats.recv_probes++;
2111 if (msg_size(msg) > sizeof(l_ptr->proto_msg)) { 2105 if (msg_size(msg) > sizeof(l_ptr->proto_msg))
2112 max_pkt_ack = msg_size(msg); 2106 max_pkt_ack = msg_size(msg);
2113 }
2114 } 2107 }
2115 2108
2116 /* Protocol message before retransmits, reduce loss risk */ 2109 /* Protocol message before retransmits, reduce loss risk */