diff options
author | Ying Xue <ying.xue@windriver.com> | 2013-10-18 07:23:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-18 13:20:43 -0400 |
commit | f2875c3cc4769d07bab3bc6e51c386840a7de280 (patch) | |
tree | 22ad4a05e77bad4316b5d95bfe397f83f4b3615f /net/tipc/bearer.h | |
parent | 4babbaa8a1ecf1cb76de5e1635417c7472190ef5 (diff) | |
download | lwn-f2875c3cc4769d07bab3bc6e51c386840a7de280.tar.gz lwn-f2875c3cc4769d07bab3bc6e51c386840a7de280.zip |
tipc: avoid unnecessary lookup for tipc bearer instance
tipc_block_bearer() currently takes a bearer name (const char*)
as argument. This requires the function to make a lookup to find
the pointer to the corresponding bearer struct. In the current
code base this is not necessary, since the only two callers
(tipc_continue(),recv_notification()) already have validated
copies of this pointer, and hence can pass it directly in the
function call.
We change tipc_block_bearer() to directly take struct tipc_bearer*
as argument instead.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r-- | net/tipc/bearer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index f800e63980cf..e5e04be6fffa 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h @@ -163,7 +163,7 @@ int tipc_register_media(struct tipc_media *m_ptr); void tipc_recv_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr); -int tipc_block_bearer(const char *name); +int tipc_block_bearer(struct tipc_bearer *b_ptr); void tipc_continue(struct tipc_bearer *tb_ptr); int tipc_enable_bearer(const char *bearer_name, u32 disc_domain, u32 priority); |