aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/qp.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-05-22 20:33:45 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-05-24 09:39:25 -0600
commit25e62655c79395c596601a35805c3c7376d097b6 (patch)
tree6862f5ec7948886e016466757c41c06b02758874 /drivers/infiniband/hw/mlx4/qp.c
parentIB/mlx5: Fetch soft WQE's on fatal error state (diff)
downloadlinux-dev-25e62655c79395c596601a35805c3c7376d097b6.tar.xz
linux-dev-25e62655c79395c596601a35805c3c7376d097b6.zip
IB/core: Reduce the places that use zgid
Instead of open coding memcmp() to check whether a given GID is zero or not, use a helper function to do so, and replace instances of memcpy(z,&zgid) with memset. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 199648adac74..cd2c08c45334 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -3078,7 +3078,7 @@ static int fill_gid_by_hw_index(struct mlx4_ib_dev *ibdev, u8 port_num,
memcpy(gid, &port_gid_table->gids[index].gid, sizeof(*gid));
*gid_type = port_gid_table->gids[index].gid_type;
spin_unlock_irqrestore(&iboe->lock, flags);
- if (!memcmp(gid, &zgid, sizeof(*gid)))
+ if (rdma_is_zero_gid(gid))
return -ENOENT;
return 0;