diff options
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r-- | net/tipc/port.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index ffba1e7f06d2..e70d27ea6578 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -291,7 +291,7 @@ int tipc_deleteport(u32 ref) | |||
291 | kfree(p_ptr); | 291 | kfree(p_ptr); |
292 | dbg("Deleted port %u\n", ref); | 292 | dbg("Deleted port %u\n", ref); |
293 | tipc_net_route_msg(buf); | 293 | tipc_net_route_msg(buf); |
294 | return TIPC_OK; | 294 | return 0; |
295 | } | 295 | } |
296 | 296 | ||
297 | /** | 297 | /** |
@@ -336,7 +336,7 @@ int tipc_portunreliable(u32 ref, unsigned int *isunreliable) | |||
336 | return -EINVAL; | 336 | return -EINVAL; |
337 | *isunreliable = port_unreliable(p_ptr); | 337 | *isunreliable = port_unreliable(p_ptr); |
338 | tipc_port_unlock(p_ptr); | 338 | tipc_port_unlock(p_ptr); |
339 | return TIPC_OK; | 339 | return 0; |
340 | } | 340 | } |
341 | 341 | ||
342 | int tipc_set_portunreliable(u32 ref, unsigned int isunreliable) | 342 | int tipc_set_portunreliable(u32 ref, unsigned int isunreliable) |
@@ -348,7 +348,7 @@ int tipc_set_portunreliable(u32 ref, unsigned int isunreliable) | |||
348 | return -EINVAL; | 348 | return -EINVAL; |
349 | msg_set_src_droppable(&p_ptr->publ.phdr, (isunreliable != 0)); | 349 | msg_set_src_droppable(&p_ptr->publ.phdr, (isunreliable != 0)); |
350 | tipc_port_unlock(p_ptr); | 350 | tipc_port_unlock(p_ptr); |
351 | return TIPC_OK; | 351 | return 0; |
352 | } | 352 | } |
353 | 353 | ||
354 | static int port_unreturnable(struct port *p_ptr) | 354 | static int port_unreturnable(struct port *p_ptr) |
@@ -365,7 +365,7 @@ int tipc_portunreturnable(u32 ref, unsigned int *isunrejectable) | |||
365 | return -EINVAL; | 365 | return -EINVAL; |
366 | *isunrejectable = port_unreturnable(p_ptr); | 366 | *isunrejectable = port_unreturnable(p_ptr); |
367 | tipc_port_unlock(p_ptr); | 367 | tipc_port_unlock(p_ptr); |
368 | return TIPC_OK; | 368 | return 0; |
369 | } | 369 | } |
370 | 370 | ||
371 | int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable) | 371 | int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable) |
@@ -377,7 +377,7 @@ int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable) | |||
377 | return -EINVAL; | 377 | return -EINVAL; |
378 | msg_set_dest_droppable(&p_ptr->publ.phdr, (isunrejectable != 0)); | 378 | msg_set_dest_droppable(&p_ptr->publ.phdr, (isunrejectable != 0)); |
379 | tipc_port_unlock(p_ptr); | 379 | tipc_port_unlock(p_ptr); |
380 | return TIPC_OK; | 380 | return 0; |
381 | } | 381 | } |
382 | 382 | ||
383 | /* | 383 | /* |
@@ -963,7 +963,7 @@ static u32 port_dispatcher(struct tipc_port *dummy, struct sk_buff *buf) | |||
963 | tipc_k_signal((Handler)port_dispatcher_sigh, 0); | 963 | tipc_k_signal((Handler)port_dispatcher_sigh, 0); |
964 | } | 964 | } |
965 | spin_unlock_bh(&queue_lock); | 965 | spin_unlock_bh(&queue_lock); |
966 | return TIPC_OK; | 966 | return 0; |
967 | } | 967 | } |
968 | 968 | ||
969 | /* | 969 | /* |
@@ -1068,14 +1068,14 @@ int tipc_createport(u32 user_ref, | |||
1068 | tipc_reg_add_port(up_ptr); | 1068 | tipc_reg_add_port(up_ptr); |
1069 | *portref = p_ptr->publ.ref; | 1069 | *portref = p_ptr->publ.ref; |
1070 | tipc_port_unlock(p_ptr); | 1070 | tipc_port_unlock(p_ptr); |
1071 | return TIPC_OK; | 1071 | return 0; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | int tipc_ownidentity(u32 ref, struct tipc_portid *id) | 1074 | int tipc_ownidentity(u32 ref, struct tipc_portid *id) |
1075 | { | 1075 | { |
1076 | id->ref = ref; | 1076 | id->ref = ref; |
1077 | id->node = tipc_own_addr; | 1077 | id->node = tipc_own_addr; |
1078 | return TIPC_OK; | 1078 | return 0; |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | int tipc_portimportance(u32 ref, unsigned int *importance) | 1081 | int tipc_portimportance(u32 ref, unsigned int *importance) |
@@ -1087,7 +1087,7 @@ int tipc_portimportance(u32 ref, unsigned int *importance) | |||
1087 | return -EINVAL; | 1087 | return -EINVAL; |
1088 | *importance = (unsigned int)msg_importance(&p_ptr->publ.phdr); | 1088 | *importance = (unsigned int)msg_importance(&p_ptr->publ.phdr); |
1089 | tipc_port_unlock(p_ptr); | 1089 | tipc_port_unlock(p_ptr); |
1090 | return TIPC_OK; | 1090 | return 0; |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | int tipc_set_portimportance(u32 ref, unsigned int imp) | 1093 | int tipc_set_portimportance(u32 ref, unsigned int imp) |
@@ -1102,7 +1102,7 @@ int tipc_set_portimportance(u32 ref, unsigned int imp) | |||
1102 | return -EINVAL; | 1102 | return -EINVAL; |
1103 | msg_set_importance(&p_ptr->publ.phdr, (u32)imp); | 1103 | msg_set_importance(&p_ptr->publ.phdr, (u32)imp); |
1104 | tipc_port_unlock(p_ptr); | 1104 | tipc_port_unlock(p_ptr); |
1105 | return TIPC_OK; | 1105 | return 0; |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | 1108 | ||
@@ -1137,7 +1137,7 @@ int tipc_publish(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) | |||
1137 | list_add(&publ->pport_list, &p_ptr->publications); | 1137 | list_add(&publ->pport_list, &p_ptr->publications); |
1138 | p_ptr->pub_count++; | 1138 | p_ptr->pub_count++; |
1139 | p_ptr->publ.published = 1; | 1139 | p_ptr->publ.published = 1; |
1140 | res = TIPC_OK; | 1140 | res = 0; |
1141 | } | 1141 | } |
1142 | exit: | 1142 | exit: |
1143 | tipc_port_unlock(p_ptr); | 1143 | tipc_port_unlock(p_ptr); |
@@ -1160,7 +1160,7 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) | |||
1160 | tipc_nametbl_withdraw(publ->type, publ->lower, | 1160 | tipc_nametbl_withdraw(publ->type, publ->lower, |
1161 | publ->ref, publ->key); | 1161 | publ->ref, publ->key); |
1162 | } | 1162 | } |
1163 | res = TIPC_OK; | 1163 | res = 0; |
1164 | } else { | 1164 | } else { |
1165 | list_for_each_entry_safe(publ, tpubl, | 1165 | list_for_each_entry_safe(publ, tpubl, |
1166 | &p_ptr->publications, pport_list) { | 1166 | &p_ptr->publications, pport_list) { |
@@ -1174,7 +1174,7 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) | |||
1174 | break; | 1174 | break; |
1175 | tipc_nametbl_withdraw(publ->type, publ->lower, | 1175 | tipc_nametbl_withdraw(publ->type, publ->lower, |
1176 | publ->ref, publ->key); | 1176 | publ->ref, publ->key); |
1177 | res = TIPC_OK; | 1177 | res = 0; |
1178 | break; | 1178 | break; |
1179 | } | 1179 | } |
1180 | } | 1180 | } |
@@ -1218,7 +1218,7 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer) | |||
1218 | tipc_nodesub_subscribe(&p_ptr->subscription,peer->node, | 1218 | tipc_nodesub_subscribe(&p_ptr->subscription,peer->node, |
1219 | (void *)(unsigned long)ref, | 1219 | (void *)(unsigned long)ref, |
1220 | (net_ev_handler)port_handle_node_down); | 1220 | (net_ev_handler)port_handle_node_down); |
1221 | res = TIPC_OK; | 1221 | res = 0; |
1222 | exit: | 1222 | exit: |
1223 | tipc_port_unlock(p_ptr); | 1223 | tipc_port_unlock(p_ptr); |
1224 | p_ptr->publ.max_pkt = tipc_link_get_max_pkt(peer->node, ref); | 1224 | p_ptr->publ.max_pkt = tipc_link_get_max_pkt(peer->node, ref); |
@@ -1240,7 +1240,7 @@ int tipc_disconnect_port(struct tipc_port *tp_ptr) | |||
1240 | /* let timer expire on it's own to avoid deadlock! */ | 1240 | /* let timer expire on it's own to avoid deadlock! */ |
1241 | tipc_nodesub_unsubscribe( | 1241 | tipc_nodesub_unsubscribe( |
1242 | &((struct port *)tp_ptr)->subscription); | 1242 | &((struct port *)tp_ptr)->subscription); |
1243 | res = TIPC_OK; | 1243 | res = 0; |
1244 | } else { | 1244 | } else { |
1245 | res = -ENOTCONN; | 1245 | res = -ENOTCONN; |
1246 | } | 1246 | } |
@@ -1305,7 +1305,7 @@ int tipc_isconnected(u32 ref, int *isconnected) | |||
1305 | return -EINVAL; | 1305 | return -EINVAL; |
1306 | *isconnected = p_ptr->publ.connected; | 1306 | *isconnected = p_ptr->publ.connected; |
1307 | tipc_port_unlock(p_ptr); | 1307 | tipc_port_unlock(p_ptr); |
1308 | return TIPC_OK; | 1308 | return 0; |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | int tipc_peer(u32 ref, struct tipc_portid *peer) | 1311 | int tipc_peer(u32 ref, struct tipc_portid *peer) |
@@ -1319,7 +1319,7 @@ int tipc_peer(u32 ref, struct tipc_portid *peer) | |||
1319 | if (p_ptr->publ.connected) { | 1319 | if (p_ptr->publ.connected) { |
1320 | peer->ref = port_peerport(p_ptr); | 1320 | peer->ref = port_peerport(p_ptr); |
1321 | peer->node = port_peernode(p_ptr); | 1321 | peer->node = port_peernode(p_ptr); |
1322 | res = TIPC_OK; | 1322 | res = 0; |
1323 | } else | 1323 | } else |
1324 | res = -ENOTCONN; | 1324 | res = -ENOTCONN; |
1325 | tipc_port_unlock(p_ptr); | 1325 | tipc_port_unlock(p_ptr); |