public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Sean Hefty" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: 'Jason Gunthorpe'
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Linux RDMA list
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: RE: [PATCH libibcm] Return errors from the kernel consistently
Date: Tue, 20 Oct 2009 10:09:22 -0700	[thread overview]
Message-ID: <34B1325549824112A02BFE95F2886CB2@amr.corp.intel.com> (raw)
In-Reply-To: <20091020055834.GA26350-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

>This fixes one subtle bug, where a return of 0 from the kernel will
>result in a success report from the library, and fixes a terrible
>API in the process. Use errno, or return the code, or both.
>Not half and half..
>
>It is easier to return errno than to fixup the cases that don't,
>so lets stick with that.
>
>Codes should have been be positive for alignment with POSIX, but
>it is much too late for that..
>
>Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>---
> src/cm.c |   30 +++++++++++++++---------------
> 1 files changed, 15 insertions(+), 15 deletions(-)
>
>librdmacm has the same basic flaw too.

Thanks - I'll fixup librdmacm the same way.

Is there a reason that you used -1*errno, rather than just -errno?

- Sean

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-10-20 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20  5:58 [PATCH libibcm] Return errors from the kernel consistently Jason Gunthorpe
     [not found] ` <20091020055834.GA26350-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-20 17:09   ` Sean Hefty [this message]
     [not found]     ` <34B1325549824112A02BFE95F2886CB2-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-10-20 17:13       ` Jason Gunthorpe

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=34B1325549824112A02BFE95F2886CB2@amr.corp.intel.com \
    --to=sean.hefty-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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