mlx5_ib_umr_context in mlx5_ib.h and mlx5r_umr_context in umr.h have identical layouts: an ib_cqe, a status, and a completion. The done callback used mlx5_ib_umr_context via container_of, while every other site in umr.c used mlx5r_umr_context. Remove the duplicate and use mlx5r_umr_context consistently throughout. No behaviour change. Signed-off-by: Yishai Hadas --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 ------ drivers/infiniband/hw/mlx5/umr.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 4a6ee14ffd7d..5b81d7596bea 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -749,12 +749,6 @@ struct mlx5_ib_mw { struct mlx5_ib_mkey mmkey; }; -struct mlx5_ib_umr_context { - struct ib_cqe cqe; - enum ib_wc_status status; - struct completion done; -}; - enum { MLX5_UMR_STATE_UNINIT, MLX5_UMR_STATE_ACTIVE, diff --git a/drivers/infiniband/hw/mlx5/umr.c b/drivers/infiniband/hw/mlx5/umr.c index 711075e3d9ea..4a3fa79eba3a 100644 --- a/drivers/infiniband/hw/mlx5/umr.c +++ b/drivers/infiniband/hw/mlx5/umr.c @@ -339,8 +339,8 @@ static int mlx5r_umr_recover(struct mlx5_ib_dev *dev, u32 mkey, static void mlx5r_umr_done(struct ib_cq *cq, struct ib_wc *wc) { - struct mlx5_ib_umr_context *context = - container_of(wc->wr_cqe, struct mlx5_ib_umr_context, cqe); + struct mlx5r_umr_context *context = + container_of(wc->wr_cqe, struct mlx5r_umr_context, cqe); context->status = wc->status; complete(&context->done); -- 2.18.1