Skip to content

Commit 1201d68

Browse files
Shuo Liugregkh
authored andcommitted
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: 3d679d5 ("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>
1 parent a758b7c commit 1201d68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/virt/acrn/hsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static long acrn_dev_ioctl(struct file *filp, unsigned int cmd,
333333
acrn_ioreq_request_clear(vm);
334334
break;
335335
case ACRN_IOCTL_PM_GET_CPU_STATE:
336-
if (copy_from_user(&cstate_cmd, (void *)ioctl_param,
336+
if (copy_from_user(&cstate_cmd, (void __user *)ioctl_param,
337337
sizeof(cstate_cmd)))
338338
return -EFAULT;
339339

0 commit comments

Comments
 (0)