diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-07-15 01:44:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 01:44:01 -0400 |
commit | 0e35fd5e5264bb46d1febbe9cd9aa08421c21a96 (patch) | |
tree | 984ea14bf1e691d02b3202abeff087ba4369bc44 /net/tipc/link.c | |
parent | 2da59918e26837f305131cfac9c0f1b3b42bb8ae (diff) |
tipc: Eliminate improper use of TIPC_OK error code
This patch corrects many places where TIPC routines indicated
successful completion by returning TIPC_OK instead of 0.
(The TIPC_OK symbol has the value 0, but it should only be used
in contexts that deal with the error code field of a TIPC
message header.)
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 9784a8e963b..d60113ba4b1 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1561,7 +1561,7 @@ u32 tipc_link_push_packet(struct link *l_ptr) | |||
1561 | l_ptr->retransm_queue_head = mod(++r_q_head); | 1561 | l_ptr->retransm_queue_head = mod(++r_q_head); |
1562 | l_ptr->retransm_queue_size = --r_q_size; | 1562 | l_ptr->retransm_queue_size = --r_q_size; |
1563 | l_ptr->stats.retransmitted++; | 1563 | l_ptr->stats.retransmitted++; |
1564 | return TIPC_OK; | 1564 | return 0; |
1565 | } else { | 1565 | } else { |
1566 | l_ptr->stats.bearer_congs++; | 1566 | l_ptr->stats.bearer_congs++; |
1567 | msg_dbg(buf_msg(buf), "|>DEF-RETR>"); | 1567 | msg_dbg(buf_msg(buf), "|>DEF-RETR>"); |
@@ -1580,7 +1580,7 @@ u32 tipc_link_push_packet(struct link *l_ptr) | |||
1580 | l_ptr->unacked_window = 0; | 1580 | l_ptr->unacked_window = 0; |
1581 | buf_discard(buf); | 1581 | buf_discard(buf); |
1582 | l_ptr->proto_msg_queue = NULL; | 1582 | l_ptr->proto_msg_queue = NULL; |
1583 | return TIPC_OK; | 1583 | return 0; |
1584 | } else { | 1584 | } else { |
1585 | msg_dbg(buf_msg(buf), "|>DEF-PROT>"); | 1585 | msg_dbg(buf_msg(buf), "|>DEF-PROT>"); |
1586 | l_ptr->stats.bearer_congs++; | 1586 | l_ptr->stats.bearer_congs++; |
@@ -1604,7 +1604,7 @@ u32 tipc_link_push_packet(struct link *l_ptr) | |||
1604 | msg_set_type(msg, CLOSED_MSG); | 1604 | msg_set_type(msg, CLOSED_MSG); |
1605 | msg_dbg(msg, ">PUSH-DATA>"); | 1605 | msg_dbg(msg, ">PUSH-DATA>"); |
1606 | l_ptr->next_out = buf->next; | 1606 | l_ptr->next_out = buf->next; |
1607 | return TIPC_OK; | 1607 | return 0; |
1608 | } else { | 1608 | } else { |
1609 | msg_dbg(msg, "|PUSH-DATA|"); | 1609 | msg_dbg(msg, "|PUSH-DATA|"); |
1610 | l_ptr->stats.bearer_congs++; | 1610 | l_ptr->stats.bearer_congs++; |
@@ -1628,8 +1628,8 @@ void tipc_link_push_queue(struct link *l_ptr) | |||
1628 | 1628 | ||
1629 | do { | 1629 | do { |
1630 | res = tipc_link_push_packet(l_ptr); | 1630 | res = tipc_link_push_packet(l_ptr); |
1631 | } | 1631 | } while (!res); |
1632 | while (res == TIPC_OK); | 1632 | |
1633 | if (res == PUSH_FAILED) | 1633 | if (res == PUSH_FAILED) |
1634 | tipc_bearer_schedule(l_ptr->b_ptr, l_ptr); | 1634 | tipc_bearer_schedule(l_ptr->b_ptr, l_ptr); |
1635 | } | 1635 | } |
@@ -2998,7 +2998,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space | |||
2998 | link_set_supervision_props(l_ptr, new_value); | 2998 | link_set_supervision_props(l_ptr, new_value); |
2999 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, | 2999 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, |
3000 | 0, 0, new_value, 0, 0); | 3000 | 0, 0, new_value, 0, 0); |
3001 | res = TIPC_OK; | 3001 | res = 0; |
3002 | } | 3002 | } |
3003 | break; | 3003 | break; |
3004 | case TIPC_CMD_SET_LINK_PRI: | 3004 | case TIPC_CMD_SET_LINK_PRI: |
@@ -3007,14 +3007,14 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space | |||
3007 | l_ptr->priority = new_value; | 3007 | l_ptr->priority = new_value; |
3008 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, | 3008 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, |
3009 | 0, 0, 0, new_value, 0); | 3009 | 0, 0, 0, new_value, 0); |
3010 | res = TIPC_OK; | 3010 | res = 0; |
3011 | } | 3011 | } |
3012 | break; | 3012 | break; |
3013 | case TIPC_CMD_SET_LINK_WINDOW: | 3013 | case TIPC_CMD_SET_LINK_WINDOW: |
3014 | if ((new_value >= TIPC_MIN_LINK_WIN) && | 3014 | if ((new_value >= TIPC_MIN_LINK_WIN) && |
3015 | (new_value <= TIPC_MAX_LINK_WIN)) { | 3015 | (new_value <= TIPC_MAX_LINK_WIN)) { |
3016 | tipc_link_set_queue_limits(l_ptr, new_value); | 3016 | tipc_link_set_queue_limits(l_ptr, new_value); |
3017 | res = TIPC_OK; | 3017 | res = 0; |
3018 | } | 3018 | } |
3019 | break; | 3019 | break; |
3020 | } | 3020 | } |
@@ -3230,7 +3230,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
3230 | if (op == TIPC_CMD_UNBLOCK_LINK) { | 3230 | if (op == TIPC_CMD_UNBLOCK_LINK) { |
3231 | l_ptr->blocked = 0; | 3231 | l_ptr->blocked = 0; |
3232 | } | 3232 | } |
3233 | res = TIPC_OK; | 3233 | res = 0; |
3234 | } | 3234 | } |
3235 | tipc_node_unlock(node); | 3235 | tipc_node_unlock(node); |
3236 | } | 3236 | } |