summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_cmd.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-03-27 14:18:47 -0600
committerJason Gunthorpe <jgg@mellanox.com>2018-03-29 13:42:29 -0600
commit6f57c933a49afb30d987f0ba7db4f52452f7d638 (patch)
tree9ac826827f71127f4a6ce58c59638a5be0afaa39 /drivers/infiniband/core/uverbs_cmd.c
parent5b2cc79de8782ea98ef22cddb26fcd566c565094 (diff)
downloadlinux-0-day-6f57c933a49afb30d987f0ba7db4f52452f7d638.tar.gz
linux-0-day-6f57c933a49afb30d987f0ba7db4f52452f7d638.tar.xz
RDMA: Use u64_to_user_ptr everywhere
This is already used in many places, get the rest of them too, only to make the code a bit clearer & simpler. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index bb29146c3823d..536d78baacd3c 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -3581,7 +3581,7 @@ static int __uverbs_create_xsrq(struct ib_uverbs_file *file,
if (cmd->srq_type == IB_SRQT_XRC)
resp.srqn = srq->ext.xrc.srq_num;
- if (copy_to_user((void __user *) (unsigned long) cmd->response,
+ if (copy_to_user(u64_to_user_ptr(cmd->response),
&resp, sizeof resp)) {
ret = -EFAULT;
goto err_copy;