public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yajun Deng <yajun.deng@linux.dev>
To: jgg@nvidia.com, selvin.xavier@broadcom.com, galpress@amazon.com,
	sleybo@amazon.com, liangwenpeng@huawei.com, liweihang@huawei.com,
	mustafa.ismail@intel.com, shiraz.saleem@intel.com,
	leonro@nvidia.com, dennis.dalessandro@cornelisnetworks.com,
	mike.marciniszyn@cornelisnetworks.com, zyjzyj2000@gmail.com
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH for-next 3/9] RDMA/efa: get rid of create_user_ah
Date: Tue,  8 Mar 2022 22:37:05 +0800	[thread overview]
Message-ID: <20220308143705.3403496-1-yajun.deng@linux.dev> (raw)

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


             reply	other threads:[~2022-03-08 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 14:37 Yajun Deng [this message]
2022-03-09  7:20 ` [PATCH for-next 3/9] RDMA/efa: get rid of create_user_ah Gal Pressman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220308143705.3403496-1-yajun.deng@linux.dev \
    --to=yajun.deng@linux.dev \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=galpress@amazon.com \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liweihang@huawei.com \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    --cc=mustafa.ismail@intel.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=shiraz.saleem@intel.com \
    --cc=sleybo@amazon.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox