From: Leon Romanovsky <leonro@xxxxxxxxxxxx> There is no need to do custom logic to allocate indexes while kernel provides specific API for that. Thanks Leon Romanovsky (2): RDMA/uverbs: Use kernel API to allocate uverbs indexes RDMA/umad: Use kernel API to allocate umad indexes drivers/infiniband/core/user_mad.c | 11 +++++------ drivers/infiniband/core/uverbs_main.c | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) -- 2.14.4