msm: mink: Fix compilation issues for 32bit targets
Fix compilation errors which were triggered after enabling smcinvoke driver for targets which has 32bit architecture. Change-Id: Id85cea7720343cb4101155d5f33f93a1b9946abf Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
This commit is contained in:
parent
a80e267a8c
commit
63cba64989
1 changed files with 5 additions and 5 deletions
|
@ -235,7 +235,7 @@ static int marshal_out(void *buf, uint32_t buf_size,
|
||||||
pr_err("%s: buffer overflow detected\n", __func__);
|
pr_err("%s: buffer overflow detected\n", __func__);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (copy_to_user((void __user *)(args_buf[i].b.addr),
|
if (copy_to_user((void __user *)(uintptr_t)(args_buf[i].b.addr),
|
||||||
(uint8_t *)(buf) + tz_args->b.offset,
|
(uint8_t *)(buf) + tz_args->b.offset,
|
||||||
tz_args->b.size)) {
|
tz_args->b.size)) {
|
||||||
pr_err("Error %d copying ctxt to user\n", ret);
|
pr_err("Error %d copying ctxt to user\n", ret);
|
||||||
|
@ -320,7 +320,7 @@ static int marshal_in(const struct smcinvoke_cmd_req *req,
|
||||||
tz_args++;
|
tz_args++;
|
||||||
|
|
||||||
if (copy_from_user(buf+offset,
|
if (copy_from_user(buf+offset,
|
||||||
(void __user *)(args_buf[i].b.addr),
|
(void __user *)(uintptr_t)(args_buf[i].b.addr),
|
||||||
args_buf[i].b.size))
|
args_buf[i].b.size))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ long smcinvoke_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = copy_from_user(args_buf,
|
ret = copy_from_user(args_buf,
|
||||||
(void __user *)(req.args),
|
(void __user *)(uintptr_t)(req.args),
|
||||||
nr_args * req.argsize);
|
nr_args * req.argsize);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -424,8 +424,8 @@ long smcinvoke_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
|
||||||
|
|
||||||
ret = marshal_out(in_msg, inmsg_size, &req, args_buf);
|
ret = marshal_out(in_msg, inmsg_size, &req, args_buf);
|
||||||
|
|
||||||
ret |= copy_to_user((void __user *)(req.args), args_buf,
|
ret |= copy_to_user((void __user *)(uintptr_t)(req.args),
|
||||||
nr_args * req.argsize);
|
args_buf, nr_args * req.argsize);
|
||||||
ret |= copy_to_user((void __user *)arg, &req, sizeof(req));
|
ret |= copy_to_user((void __user *)arg, &req, sizeof(req));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Reference in a new issue