From: Leon Romanovsky Date: Fri, 13 Feb 2026 10:57:50 +0000 (+0200) Subject: RDMA/mlx4: Remove unused create_flags field from CQ structure X-Git-Tag: v7.1-rc1~75^2~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58409f0d4dd3f9e987214064e49b088823934304;p=thirdparty%2Fkernel%2Flinux.git RDMA/mlx4: Remove unused create_flags field from CQ structure The CQ creation flags do not need to be cached, as they are used immediately at the point where they are stored. Remove the unused field and reclaim 4 bytes. Link: https://patch.msgid.link/20260213-refactor-umem-v1-14-f3be85847922@nvidia.com Signed-off-by: Leon Romanovsky --- diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 9ab3228323c6..8535fd561691 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -165,7 +165,6 @@ int mlx4_ib_create_user_cq(struct ib_cq *ibcq, cq->ibcq.cqe = entries - 1; mutex_init(&cq->resize_mutex); spin_lock_init(&cq->lock); - cq->create_flags = attr->flags; INIT_LIST_HEAD(&cq->send_qp_list); INIT_LIST_HEAD(&cq->recv_qp_list); @@ -208,8 +207,7 @@ int mlx4_ib_create_user_cq(struct ib_cq *ibcq, err = mlx4_cq_alloc(dev->dev, entries, &cq->buf.mtt, &context->uar, cq->db.dma, &cq->mcq, vector, 0, - !!(cq->create_flags & - IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION), + attr->flags & IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION, buf_addr, true); if (err) goto err_dbmap; diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index 96563c0836ce..6a7ed5225c7d 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h @@ -122,7 +122,6 @@ struct mlx4_ib_cq { spinlock_t lock; struct mutex resize_mutex; struct ib_umem *resize_umem; - int create_flags; /* List of qps that it serves.*/ struct list_head send_qp_list; struct list_head recv_qp_list;