On Wed, Mar 09, 2011 at 05:04:30PM +0100, Bart Van Assche wrote:
> On Wed, Mar 9, 2011 at 2:28 AM, Jason Gunthorpe
> <[email protected]> wrote:
> > - ? ? ? ? ? ? ? ? ? ? ? ret = -1;
> > + ? ? ? ? ? ? ? ? ? ? ? ret = ENOMEM;
> 
> I'm afraid that this will break any code that tests return values with
> the test "< 0". Introducing error codes is good, but why to change
> negative return codes into positive ?

Any code that checks for < 0 is already broken. This is just the mlx4
userspace driver, other drivers correctly return positive errno, eg
any driver that uses the ibv_cmd_post_send path returns positive
errno.

The standard convention for ibverbs, clearly stated in the manual
is that 0 is success and everything else is errno.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to