RDMA/uverbs: Annotate uverbs_request_next_ptr() return value as a __user pointer

This patch avoids that sparse complains about a mismatch between the
returned value and the function return type.

Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Fixes: c3bea3d2dc ("RDMA/uverbs: Use the iterator for ib_uverbs_unmarshall_recv()")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Bart Van Assche 2019-03-27 16:50:46 -07:00 committed by Jason Gunthorpe
parent 259e66bcdf
commit 2dcdebff5e
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ static const void __user *uverbs_request_next_ptr(struct uverbs_req_iter *iter,
const void __user *res = iter->cur;
if (iter->cur + len > iter->end)
return ERR_PTR(-ENOSPC);
return (void __force __user *)ERR_PTR(-ENOSPC);
iter->cur += len;
return res;
}