]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Refactor flags checks and update return value
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 21 Feb 2018 16:12:33 +0000 (18:12 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 23 Feb 2018 03:29:11 +0000 (22:29 -0500)
commit8f401763709b0ff7ca33ea4006222180ad40108b
tree0c7b772a111cb0a8aaecdbe40fa260a794bee170
parentf2519276d3a68b37838b32e94aac69bafba566a7
RDMA/uverbs: Refactor flags checks and update return value

Since commit 2c043b130e39 ("IB/core: extended command: an
improved infrastructure for uverbs commands"), the uverbs
supports extra flags as an input to the command interface.

However actually, there is only one flag available and used,
so it is better to refactor the code, so the resolution and
report to the users is done as early as possible.

As part of this change, we changed the return value of failure case
from ENOSYS to be EINVAL to be consistent with the rest flags checks.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_main.c