From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> Makes no sense, just use the full path to the substructure member. Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- providers/mlx4/mlx4.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/providers/mlx4/mlx4.h b/providers/mlx4/mlx4.h index ef0c7cb9c9a733..a71e42f5c6e25f 100644 --- a/providers/mlx4/mlx4.h +++ b/providers/mlx4/mlx4.h @@ -275,14 +275,12 @@ static inline struct mlx4_cq *to_mcq(struct ibv_cq *ibcq) static inline struct mlx4_srq *to_msrq(struct ibv_srq *ibsrq) { - return container_of(container_of(ibsrq, struct verbs_srq, srq), - struct mlx4_srq, verbs_srq); + return container_of(ibsrq, struct mlx4_srq, verbs_srq.srq); } static inline struct mlx4_qp *to_mqp(struct ibv_qp *ibqp) { - return container_of(container_of(ibqp, struct verbs_qp, qp), - struct mlx4_qp, verbs_qp); + return container_of(ibqp, struct mlx4_qp, verbs_qp.qp); } static inline struct mlx4_qp *wq_to_mqp(struct ibv_wq *ibwq) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html