On 24/08/2020 13:44, Leon Romanovsky wrote: > diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h > index e84b0fedaacb..7c4752c47f80 100644 > --- a/drivers/infiniband/core/core_priv.h > +++ b/drivers/infiniband/core/core_priv.h > @@ -347,6 +347,8 @@ static inline struct ib_qp *_ib_create_qp(struct ib_device *dev, > qp->srq = attr->srq; > qp->rwq_ind_tbl = attr->rwq_ind_tbl; > qp->event_handler = attr->event_handler; > + qp->qp_type = attr->qp_type; Already assigned above. > + qp->port = attr->port_num; If the assignment is moved here then it can be removed from ib_create_qp which was added in the first patch. Also, in the first patch it's surrounded by an if.