Message ID | 20181115045648.7810-1-kamalheib1@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [rdma-next] RDMA/rdmavt: Fix rvt_create_ah prototype | expand |
> -----Original Message----- > From: linux-rdma-owner@vger.kernel.org <linux-rdma- > owner@vger.kernel.org> On Behalf Of Kamal Heib > Sent: Wednesday, November 14, 2018 8:57 PM > To: Doug Ledford <dledford@redhat.com>; Jason Gunthorpe <jgg@ziepe.ca> > Cc: linux-rdma@vger.kernel.org; Kamal Heib <kamalheib1@gmail.com> > Subject: [PATCH rdma-next] RDMA/rdmavt: Fix rvt_create_ah prototype > > This patch fixes the wrong assignment of the create_ah function pointer, the > create_ah verb receive three parameters while the rvt_create_ah receives > two parameters, this happens due to the wrong function casting that is done > in check_driver_override(). > Please add fixes tag here. > Signed-off-by: Kamal Heib <kamalheib1@gmail.com> > --- > drivers/infiniband/sw/rdmavt/ah.c | 4 +++- > drivers/infiniband/sw/rdmavt/ah.h | 3 ++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/sw/rdmavt/ah.c > b/drivers/infiniband/sw/rdmavt/ah.c > index 89ec0f64abfc..084bb4baebb5 100644 > --- a/drivers/infiniband/sw/rdmavt/ah.c > +++ b/drivers/infiniband/sw/rdmavt/ah.c > @@ -91,13 +91,15 @@ EXPORT_SYMBOL(rvt_check_ah); > * rvt_create_ah - create an address handle > * @pd: the protection domain > * @ah_attr: the attributes of the AH > + * @udata: pointer to user's input output buffer information. > * > * This may be called from interrupt context. > * > * Return: newly allocated ah > */ > struct ib_ah *rvt_create_ah(struct ib_pd *pd, > - struct rdma_ah_attr *ah_attr) > + struct rdma_ah_attr *ah_attr, > + struct ib_udata *udata) > { > struct rvt_ah *ah; > struct rvt_dev_info *dev = ib_to_rvt(pd->device); diff --git > a/drivers/infiniband/sw/rdmavt/ah.h b/drivers/infiniband/sw/rdmavt/ah.h > index 16105af99189..25271b48a683 100644 > --- a/drivers/infiniband/sw/rdmavt/ah.h > +++ b/drivers/infiniband/sw/rdmavt/ah.h > @@ -51,7 +51,8 @@ > #include <rdma/rdma_vt.h> > > struct ib_ah *rvt_create_ah(struct ib_pd *pd, > - struct rdma_ah_attr *ah_attr); > + struct rdma_ah_attr *ah_attr, > + struct ib_udata *udata); > int rvt_destroy_ah(struct ib_ah *ibah); int rvt_modify_ah(struct ib_ah > *ibah, struct rdma_ah_attr *ah_attr); int rvt_query_ah(struct ib_ah *ibah, > struct rdma_ah_attr *ah_attr); > -- > 2.14.5
diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c index 89ec0f64abfc..084bb4baebb5 100644 --- a/drivers/infiniband/sw/rdmavt/ah.c +++ b/drivers/infiniband/sw/rdmavt/ah.c @@ -91,13 +91,15 @@ EXPORT_SYMBOL(rvt_check_ah); * rvt_create_ah - create an address handle * @pd: the protection domain * @ah_attr: the attributes of the AH + * @udata: pointer to user's input output buffer information. * * This may be called from interrupt context. * * Return: newly allocated ah */ struct ib_ah *rvt_create_ah(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr) + struct rdma_ah_attr *ah_attr, + struct ib_udata *udata) { struct rvt_ah *ah; struct rvt_dev_info *dev = ib_to_rvt(pd->device); diff --git a/drivers/infiniband/sw/rdmavt/ah.h b/drivers/infiniband/sw/rdmavt/ah.h index 16105af99189..25271b48a683 100644 --- a/drivers/infiniband/sw/rdmavt/ah.h +++ b/drivers/infiniband/sw/rdmavt/ah.h @@ -51,7 +51,8 @@ #include <rdma/rdma_vt.h> struct ib_ah *rvt_create_ah(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr); + struct rdma_ah_attr *ah_attr, + struct ib_udata *udata); int rvt_destroy_ah(struct ib_ah *ibah); int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr); int rvt_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
This patch fixes the wrong assignment of the create_ah function pointer, the create_ah verb receive three parameters while the rvt_create_ah receives two parameters, this happens due to the wrong function casting that is done in check_driver_override(). Signed-off-by: Kamal Heib <kamalheib1@gmail.com> --- drivers/infiniband/sw/rdmavt/ah.c | 4 +++- drivers/infiniband/sw/rdmavt/ah.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)