diff options
author | Ying Xue <ying.xue@windriver.com> | 2012-08-16 08:09:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-20 05:26:30 -0400 |
commit | 379c0456afc170d56ceb712a5689ede91d293e88 (patch) | |
tree | 6118e094f24d8160dda7bcad5250e3fa22e5c2ba /net/tipc | |
parent | 381294331ed2858f8e75223310f873d580921366 (diff) |
tipc: change tipc_net_start routine return value type
Since now tipc_net_start() always returns a success code - 0, its
return value type should be changed from integer to void, which can
avoid unnecessary check for its return value.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/core.c | 5 | ||||
-rw-r--r-- | net/tipc/net.c | 3 | ||||
-rw-r--r-- | net/tipc/net.h | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index c261a5dca7c5..daae7f74d418 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -98,9 +98,8 @@ int tipc_core_start_net(unsigned long addr) | |||
98 | { | 98 | { |
99 | int res; | 99 | int res; |
100 | 100 | ||
101 | res = tipc_net_start(addr); | 101 | tipc_net_start(addr); |
102 | if (!res) | 102 | res = tipc_eth_media_start(); |
103 | res = tipc_eth_media_start(); | ||
104 | if (res) | 103 | if (res) |
105 | tipc_core_stop_net(); | 104 | tipc_core_stop_net(); |
106 | return res; | 105 | return res; |
diff --git a/net/tipc/net.c b/net/tipc/net.c index 5b5cea259caf..7d305ecc09c2 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -171,7 +171,7 @@ void tipc_net_route_msg(struct sk_buff *buf) | |||
171 | tipc_link_send(buf, dnode, msg_link_selector(msg)); | 171 | tipc_link_send(buf, dnode, msg_link_selector(msg)); |
172 | } | 172 | } |
173 | 173 | ||
174 | int tipc_net_start(u32 addr) | 174 | void tipc_net_start(u32 addr) |
175 | { | 175 | { |
176 | char addr_string[16]; | 176 | char addr_string[16]; |
177 | 177 | ||
@@ -187,7 +187,6 @@ int tipc_net_start(u32 addr) | |||
187 | pr_info("Started in network mode\n"); | 187 | pr_info("Started in network mode\n"); |
188 | pr_info("Own node address %s, network identity %u\n", | 188 | pr_info("Own node address %s, network identity %u\n", |
189 | tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); | 189 | tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); |
190 | return 0; | ||
191 | } | 190 | } |
192 | 191 | ||
193 | void tipc_net_stop(void) | 192 | void tipc_net_stop(void) |
diff --git a/net/tipc/net.h b/net/tipc/net.h index 9eb4b9e220eb..079daadb3f72 100644 --- a/net/tipc/net.h +++ b/net/tipc/net.h | |||
@@ -41,7 +41,7 @@ extern rwlock_t tipc_net_lock; | |||
41 | 41 | ||
42 | void tipc_net_route_msg(struct sk_buff *buf); | 42 | void tipc_net_route_msg(struct sk_buff *buf); |
43 | 43 | ||
44 | int tipc_net_start(u32 addr); | 44 | void tipc_net_start(u32 addr); |
45 | void tipc_net_stop(void); | 45 | void tipc_net_stop(void); |
46 | 46 | ||
47 | #endif | 47 | #endif |