Message ID | 1517296074-14459-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Tue, Jan 30, 2018 at 02:07:54AM -0500, Zhu Yanjun wrote: > In the function rxe_av_from_attr, the parameter rxe > is not used. So it is removed. > > CC: Srinivas Eeda <srinivas.eeda@oracle.com> > CC: Junxiao Bi <junxiao.bi@oracle.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_av.c | 4 ++-- > drivers/infiniband/sw/rxe/rxe_loc.h | 4 ++-- > drivers/infiniband/sw/rxe/rxe_qp.c | 5 ++--- > drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- > 4 files changed, 7 insertions(+), 8 deletions(-) Thanks, while you are doing that, can you please change the function signature to be void? And do the same trick for rxe_av_fill_ip_info(), it doesn't use rxe too. Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Thanks
On Tue, Jan 30, 2018 at 02:07:54AM -0500, Zhu Yanjun wrote: > In the function rxe_av_from_attr, the parameter rxe > is not used. So it is removed. Looks like it is also not used in rxe_av_to_attr and rxe_av_fill_ip_info. Can you fix them as well? > > CC: Srinivas Eeda <srinivas.eeda@oracle.com> > CC: Junxiao Bi <junxiao.bi@oracle.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_av.c | 4 ++-- > drivers/infiniband/sw/rxe/rxe_loc.h | 4 ++-- > drivers/infiniband/sw/rxe/rxe_qp.c | 5 ++--- > drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- > 4 files changed, 7 insertions(+), 8 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c > index 1cc9e2e..8accd5d 100644 > --- a/drivers/infiniband/sw/rxe/rxe_av.c > +++ b/drivers/infiniband/sw/rxe/rxe_av.c > @@ -52,8 +52,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr) > return 0; > } > > -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num, > - struct rxe_av *av, struct rdma_ah_attr *attr) > +int rxe_av_from_attr(u8 port_num, struct rxe_av *av, > + struct rdma_ah_attr *attr) > { > memset(av, 0, sizeof(*av)); > memcpy(&av->grh, rdma_ah_read_grh(attr), > diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h > index d7472a4..4eb0ff1 100644 > --- a/drivers/infiniband/sw/rxe/rxe_loc.h > +++ b/drivers/infiniband/sw/rxe/rxe_loc.h > @@ -38,8 +38,8 @@ > > int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr); > > -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num, > - struct rxe_av *av, struct rdma_ah_attr *attr); > +int rxe_av_from_attr(u8 port_num, struct rxe_av *av, > + struct rdma_ah_attr *attr); > > int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av, > struct rdma_ah_attr *attr); > diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c > index 4469592..11655a0 100644 > --- a/drivers/infiniband/sw/rxe/rxe_qp.c > +++ b/drivers/infiniband/sw/rxe/rxe_qp.c > @@ -633,8 +633,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, > ib_get_cached_gid(&rxe->ib_dev, 1, > rdma_ah_read_grh(&attr->ah_attr)->sgid_index, > &sgid, &sgid_attr); > - rxe_av_from_attr(rxe, attr->port_num, &qp->pri_av, > - &attr->ah_attr); > + rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr); > rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr, > &sgid_attr, &sgid); > if (sgid_attr.ndev) > @@ -648,7 +647,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, > ib_get_cached_gid(&rxe->ib_dev, 1, sgid_index, > &sgid, &sgid_attr); > > - rxe_av_from_attr(rxe, attr->alt_port_num, &qp->alt_av, > + rxe_av_from_attr(attr->alt_port_num, &qp->alt_av, > &attr->alt_ah_attr); > rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr, > &sgid_attr, &sgid); > diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c > index d03002b..abbc983 100644 > --- a/drivers/infiniband/sw/rxe/rxe_verbs.c > +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c > @@ -271,7 +271,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr, > return err; > } > > - err = rxe_av_from_attr(rxe, rdma_ah_get_port_num(attr), av, attr); > + err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr); > if (!err) > err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid); > > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr, rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter are removed and the funtion type are changed to void. To track the changes to these functions, every change is made to a single patch. Zhu Yanjun (6): IB/rxe: remove redudant parameter in function IB/rxe: change the function to void from int IB/rxe: remove unnecessary parameter in rxe_av_to_attr IB/rxe: change the function to void from int IB/rxe: change the function rxe_av_fill_ip_info to void IB/rxe: remove redudant parameter in rxe_av_fill_ip_info drivers/infiniband/sw/rxe/rxe_av.c | 14 ++++---------- drivers/infiniband/sw/rxe/rxe_loc.h | 10 ++++------ drivers/infiniband/sw/rxe/rxe_qp.c | 15 ++++++--------- drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++------ 4 files changed, 18 insertions(+), 31 deletions(-)
On Wed, Jan 31, 2018 at 06:06:53AM -0500, Zhu Yanjun wrote: > Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr, > rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter > are removed and the funtion type are changed to void. > > To track the changes to these functions, every change is made > to a single patch. > > Zhu Yanjun (6): > IB/rxe: remove redudant parameter in function > IB/rxe: change the function to void from int > IB/rxe: remove unnecessary parameter in rxe_av_to_attr > IB/rxe: change the function to void from int > IB/rxe: change the function rxe_av_fill_ip_info to void > IB/rxe: remove redudant parameter in rxe_av_fill_ip_info Since all seems to be related i wonder why not in a single patch. I assume they will squashed to one before merge, right? Besides that, for all: Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > > drivers/infiniband/sw/rxe/rxe_av.c | 14 ++++---------- > drivers/infiniband/sw/rxe/rxe_loc.h | 10 ++++------ > drivers/infiniband/sw/rxe/rxe_qp.c | 15 ++++++--------- > drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++------ > 4 files changed, 18 insertions(+), 31 deletions(-) > > -- > 2.7.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2018-01-31 at 14:39 +0200, Yuval Shaia wrote: > On Wed, Jan 31, 2018 at 06:06:53AM -0500, Zhu Yanjun wrote: > > Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr, > > rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter > > are removed and the funtion type are changed to void. > > > > To track the changes to these functions, every change is made > > to a single patch. > > > > Zhu Yanjun (6): > > IB/rxe: remove redudant parameter in function > > IB/rxe: change the function to void from int > > IB/rxe: remove unnecessary parameter in rxe_av_to_attr > > IB/rxe: change the function to void from int > > IB/rxe: change the function rxe_av_fill_ip_info to void > > IB/rxe: remove redudant parameter in rxe_av_fill_ip_info > > Since all seems to be related i wonder why not in a single patch. > I assume they will squashed to one before merge, right? > > Besides that, for all: > > Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Thanks, series applied. And I couldn't squash it without loosing info, so they stayed separate (Leon reviewed 4 of the 6, if I squashed it I would to have either added his name on the single commit, indicating he reviewed all of it when I didn't have the right to indicate that, or drop his name and thereby drop the credit for what he did review).
diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c index 1cc9e2e..8accd5d 100644 --- a/drivers/infiniband/sw/rxe/rxe_av.c +++ b/drivers/infiniband/sw/rxe/rxe_av.c @@ -52,8 +52,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr) return 0; } -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num, - struct rxe_av *av, struct rdma_ah_attr *attr) +int rxe_av_from_attr(u8 port_num, struct rxe_av *av, + struct rdma_ah_attr *attr) { memset(av, 0, sizeof(*av)); memcpy(&av->grh, rdma_ah_read_grh(attr), diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h index d7472a4..4eb0ff1 100644 --- a/drivers/infiniband/sw/rxe/rxe_loc.h +++ b/drivers/infiniband/sw/rxe/rxe_loc.h @@ -38,8 +38,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr); -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num, - struct rxe_av *av, struct rdma_ah_attr *attr); +int rxe_av_from_attr(u8 port_num, struct rxe_av *av, + struct rdma_ah_attr *attr); int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av, struct rdma_ah_attr *attr); diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index 4469592..11655a0 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -633,8 +633,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, ib_get_cached_gid(&rxe->ib_dev, 1, rdma_ah_read_grh(&attr->ah_attr)->sgid_index, &sgid, &sgid_attr); - rxe_av_from_attr(rxe, attr->port_num, &qp->pri_av, - &attr->ah_attr); + rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr); rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr, &sgid_attr, &sgid); if (sgid_attr.ndev) @@ -648,7 +647,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, ib_get_cached_gid(&rxe->ib_dev, 1, sgid_index, &sgid, &sgid_attr); - rxe_av_from_attr(rxe, attr->alt_port_num, &qp->alt_av, + rxe_av_from_attr(attr->alt_port_num, &qp->alt_av, &attr->alt_ah_attr); rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr, &sgid_attr, &sgid); diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index d03002b..abbc983 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -271,7 +271,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr, return err; } - err = rxe_av_from_attr(rxe, rdma_ah_get_port_num(attr), av, attr); + err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr); if (!err) err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
In the function rxe_av_from_attr, the parameter rxe is not used. So it is removed. CC: Srinivas Eeda <srinivas.eeda@oracle.com> CC: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> --- drivers/infiniband/sw/rxe/rxe_av.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_loc.h | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 5 ++--- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-)