]> Pileus Git - ~andy/linux/commitdiff
tipc: change tipc_net_start routine return value type
authorYing Xue <ying.xue@windriver.com>
Thu, 16 Aug 2012 12:09:10 +0000 (12:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 09:26:30 +0000 (02:26 -0700)
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>
net/tipc/core.c
net/tipc/net.c
net/tipc/net.h

index c261a5dca7c5f29897be1412fbe6832e18761e3b..daae7f74d418e443bda876835d9238fc3b5ecdea 100644 (file)
@@ -98,9 +98,8 @@ int tipc_core_start_net(unsigned long addr)
 {
        int res;
 
-       res = tipc_net_start(addr);
-       if (!res)
-               res = tipc_eth_media_start();
+       tipc_net_start(addr);
+       res = tipc_eth_media_start();
        if (res)
                tipc_core_stop_net();
        return res;
index 5b5cea259caf5efde1151318f498ca3924099eb1..7d305ecc09c2bf053376bb147c5cf917113022ae 100644 (file)
@@ -171,7 +171,7 @@ void tipc_net_route_msg(struct sk_buff *buf)
        tipc_link_send(buf, dnode, msg_link_selector(msg));
 }
 
-int tipc_net_start(u32 addr)
+void tipc_net_start(u32 addr)
 {
        char addr_string[16];
 
@@ -187,7 +187,6 @@ int tipc_net_start(u32 addr)
        pr_info("Started in network mode\n");
        pr_info("Own node address %s, network identity %u\n",
                tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
-       return 0;
 }
 
 void tipc_net_stop(void)
index 9eb4b9e220ebbb5146a2d455126b6b46d6cf48f6..079daadb3f7286471cd5146798f6b06328bf99ad 100644 (file)
@@ -41,7 +41,7 @@ extern rwlock_t tipc_net_lock;
 
 void tipc_net_route_msg(struct sk_buff *buf);
 
-int tipc_net_start(u32 addr);
+void tipc_net_start(u32 addr);
 void tipc_net_stop(void);
 
 #endif