diff options
author | Alex Estrin <alex.estrin@intel.com> | 2014-08-20 17:15:08 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-09-19 19:17:40 +0200 |
commit | 68f9d83c7765b110de54677573e9538f3ca6ca04 (patch) | |
tree | 12f1c2a829fa93b80ddbfb61bcb58f9a9950af5f /drivers | |
parent | Linux 3.17-rc2 (diff) | |
download | linux-68f9d83c7765b110de54677573e9538f3ca6ca04.tar.xz linux-68f9d83c7765b110de54677573e9538f3ca6ca04.zip |
IPoIB: Remove unnecessary port query
There are two queries for port attributes one after another. A second
call is not needed since port_attr structure already holds the data.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index d4e005720d01..ffb83b5f7e80 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -529,21 +529,13 @@ void ipoib_mcast_join_task(struct work_struct *work) port_attr.state); return; } + priv->local_lid = port_attr.lid; if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid)) ipoib_warn(priv, "ib_query_gid() failed\n"); else memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid)); - { - struct ib_port_attr attr; - - if (!ib_query_port(priv->ca, priv->port, &attr)) - priv->local_lid = attr.lid; - else - ipoib_warn(priv, "ib_query_port failed\n"); - } - if (!priv->broadcast) { struct ipoib_mcast *broadcast; |