From 708ea056b30de17e38f2842c8e953df04b3e8b31 Mon Sep 17 00:00:00 2001 From: Parav Pandit Date: Sun, 28 Jan 2018 11:25:31 +0200 Subject: IB/core: Avoid SGID attributes query while converting GID from OPA to IB SGID attributes are not used during OPA to IB GID conversion. Therefore don't query it. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/cm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/infiniband') diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index b8f8d3128a53..68df93558d80 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1577,15 +1577,13 @@ static void cm_opa_to_ib_sgid(struct cm_work *work, struct sa_path_rec *path) { struct ib_device *dev = work->port->cm_dev->ib_device; - struct ib_gid_attr gid_attr; u8 port_num = work->port->port_num; if (rdma_cap_opa_ah(dev, port_num) && (ib_is_opa_gid(&path->sgid))) { union ib_gid sgid; - if (ib_get_cached_gid(dev, port_num, 0, - &sgid, &gid_attr)) { + if (ib_get_cached_gid(dev, port_num, 0, &sgid, NULL)) { dev_warn(&dev->dev, "Error updating sgid in CM request\n"); return; -- cgit v1.2.3-59-g8ed1b