RDMA/uverbs: Simplify ib_uverbs_ex_query_device
authorJason Gunthorpe <jgg@mellanox.com>
Sun, 25 Nov 2018 18:58:41 +0000 (20:58 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 3 Dec 2018 17:01:58 +0000 (12:01 -0500)
commit7eebced1bae034e11a86c454383b24715eb087b6
tree14fe1f35f6580f590b9c5a42fd0e69020484e744
parent40efca7a46a04223e6792fbe23ba337f54cff794
RDMA/uverbs: Simplify ib_uverbs_ex_query_device

We truncate the response structure if there is not enough room in the
user buffer so there is no reason to have all the mess with finely managing
response_length. Just fully fill the attrs and truncate on copy.

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