summaryrefslogtreecommitdiffstats
path: root/drivers/virt
diff options
context:
space:
mode:
authorShuo Liu <shuo.a.liu@intel.com>2021-03-10 16:37:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 16:59:50 +0100
commit1201d68f4781141411e734315f22457e6ea2cfcb (patch)
treeb4d23de51bc3030657891a28179c6b2f53c35fb5 /drivers/virt
parentvirt: acrn: Use EPOLLIN instead of POLLIN (diff)
downloadlinux-1201d68f4781141411e734315f22457e6ea2cfcb.tar.xz
linux-1201d68f4781141411e734315f22457e6ea2cfcb.zip
virt: acrn: Correct type casting of argument of copy_from_user()
hsm.c:336:50: warning: incorrect type in argument 2 (different address spaces) hsm.c:336:50: expected void const [noderef] __user *from hsm.c:336:50: got void * This patch fixes above sparse warning. Fixes: 3d679d5aec64 ("virt: acrn: Introduce interfaces to query C-states and P-states allowed by hypervisor") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Shuo Liu <shuo.a.liu@intel.com> Link: https://lore.kernel.org/r/20210310153708.17451-1-shuo.a.liu@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virt')
-rw-r--r--drivers/virt/acrn/hsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virt/acrn/hsm.c b/drivers/virt/acrn/hsm.c
index 6996ea6219e5..130e12b8652a 100644
--- a/drivers/virt/acrn/hsm.c
+++ b/drivers/virt/acrn/hsm.c
@@ -333,7 +333,7 @@ static long acrn_dev_ioctl(struct file *filp, unsigned int cmd,
acrn_ioreq_request_clear(vm);
break;
case ACRN_IOCTL_PM_GET_CPU_STATE:
- if (copy_from_user(&cstate_cmd, (void *)ioctl_param,
+ if (copy_from_user(&cstate_cmd, (void __user *)ioctl_param,
sizeof(cstate_cmd)))
return -EFAULT;