public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next 3/9] RDMA/efa: get rid of create_user_ah
@ 2022-03-08 14:37 Yajun Deng
  2022-03-09  7:20 ` Gal Pressman
  0 siblings, 1 reply; 2+ messages in thread
From: Yajun Deng @ 2022-03-08 14:37 UTC (permalink / raw)
  To: jgg, selvin.xavier, galpress, sleybo, liangwenpeng, liweihang,
	mustafa.ismail, shiraz.saleem, leonro, dennis.dalessandro,
	mike.marciniszyn, zyjzyj2000
  Cc: linux-rdma, linux-kernel, Yajun Deng

There is no create_user_ah in ib_device_ops, remove it.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 drivers/infiniband/hw/efa/efa_main.c  | 2 +-
 drivers/infiniband/hw/efa/efa_verbs.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
index 94b94cca4870..b2f3832cd305 100644
--- a/drivers/infiniband/hw/efa/efa_main.c
+++ b/drivers/infiniband/hw/efa/efa_main.c
@@ -361,7 +361,7 @@ static const struct ib_device_ops efa_dev_ops = {
 	.alloc_ucontext = efa_alloc_ucontext,
 	.create_cq = efa_create_cq,
 	.create_qp = efa_create_qp,
-	.create_user_ah = efa_create_ah,
+	.create_ah = efa_create_ah,
 	.dealloc_pd = efa_dealloc_pd,
 	.dealloc_ucontext = efa_dealloc_ucontext,
 	.dereg_mr = efa_dereg_mr,
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index ecfe70eb5efb..44269eb18780 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1959,6 +1959,11 @@ int efa_create_ah(struct ib_ah *ibah,
 	struct efa_ah *ah = to_eah(ibah);
 	int err;
 
+	if (!udata) {
+		err = -EOPNOTSUPP;
+		goto err_out;
+	}
+
 	if (!(init_attr->flags & RDMA_CREATE_AH_SLEEPABLE)) {
 		ibdev_dbg(&dev->ibdev,
 			  "Create address handle is not supported in atomic context\n");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-09  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 14:37 [PATCH for-next 3/9] RDMA/efa: get rid of create_user_ah Yajun Deng
2022-03-09  7:20 ` Gal Pressman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox