All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Omar Navarro Leija <omarsa@seas.upenn.edu>
Cc: linux-rdma@vger.kernel.org
Subject: Re: Incorrect Return Type for rdma_destroy_qp
Date: Thu, 5 Aug 2021 09:40:49 +0300	[thread overview]
Message-ID: <YQuH8TN7dJ4MAwNf@unreal> (raw)
In-Reply-To: <CAMAtMKd2b6mKauR5HmCwEqFpHZ=me+Qn+hU_7CewETUBDnMF7Q@mail.gmail.com>

On Wed, Aug 04, 2021 at 01:30:54PM -0400, Omar Navarro Leija wrote:
> Hello!
> 
> The man page has rdma_destroy_qp as:
> 
> #include <rdma/rdma_cma.h>
> void rdma_destroy_qp (struct rdma_cm_id *id);
> 
> 
> Note the void return type. Yet the return value section states:
> 
> Return Value
> Returns 0 on success, or -1 on error. If an error occurs, errno will
> be set to indicate the failure reason. Indeed the implementation is
> written as:
> 
> void rdma_destroy_qp(struct rdma_cm_id *id)
> {
> ibv_destroy_qp(id->qp);
> id->qp = NULL;
> ucma_destroy_cqs(id);
> }
> 
> I believe  rdma_destroy_qp should return an int which propagates the
> return value of calling ibv_destroy_qp. As a workaround, I just call
> ibv_destroy_qp directly.

It is worth to fix man pages.

Thanks

> 
> Omar

      reply	other threads:[~2021-08-05  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 17:30 Incorrect Return Type for rdma_destroy_qp Omar Navarro Leija
2021-08-05  6:40 ` Leon Romanovsky [this message]

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=YQuH8TN7dJ4MAwNf@unreal \
    --to=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=omarsa@seas.upenn.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.