summaryrefslogtreecommitdiff
path: root/net/tipc/ib_media.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-10-18 09:23:18 +0400
committerDavid S. Miller <davem@davemloft.net>2013-10-18 21:20:43 +0400
commitf2875c3cc4769d07bab3bc6e51c386840a7de280 (patch)
tree22ad4a05e77bad4316b5d95bfe397f83f4b3615f /net/tipc/ib_media.c
parent4babbaa8a1ecf1cb76de5e1635417c7472190ef5 (diff)
downloadlinux-f2875c3cc4769d07bab3bc6e51c386840a7de280.tar.xz
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/ib_media.c')
-rw-r--r--net/tipc/ib_media.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/ib_media.c b/net/tipc/ib_media.c
index 5545145ccffa..20b1aa464321 100644
--- a/net/tipc/ib_media.c
+++ b/net/tipc/ib_media.c
@@ -258,17 +258,17 @@ static int recv_notification(struct notifier_block *nb, unsigned long evt,
if (netif_carrier_ok(dev))
tipc_continue(ib_ptr->bearer);
else
- tipc_block_bearer(ib_ptr->bearer->name);
+ tipc_block_bearer(ib_ptr->bearer);
break;
case NETDEV_UP:
tipc_continue(ib_ptr->bearer);
break;
case NETDEV_DOWN:
- tipc_block_bearer(ib_ptr->bearer->name);
+ tipc_block_bearer(ib_ptr->bearer);
break;
case NETDEV_CHANGEMTU:
case NETDEV_CHANGEADDR:
- tipc_block_bearer(ib_ptr->bearer->name);
+ tipc_block_bearer(ib_ptr->bearer);
tipc_continue(ib_ptr->bearer);
break;
case NETDEV_UNREGISTER: