Skip to content

Commit

Permalink
KVM: remove long -> void *user -> long cast
Browse files Browse the repository at this point in the history
kvm_dev_ioctl casts the arg value to void __user *, just to recast it
again to long. This seems unnecessary.

According to objdump the binary code on x86 is unchanged by this patch.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
borntraeger authored and avikivity committed Jul 20, 2008
1 parent 5b664cb commit 1e1c65e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,6 @@ static int kvm_dev_ioctl_create_vm(void)
static long kvm_dev_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
void __user *argp = (void __user *)arg;
long r = -EINVAL;

switch (ioctl) {
Expand All @@ -1196,7 +1195,7 @@ static long kvm_dev_ioctl(struct file *filp,
r = kvm_dev_ioctl_create_vm();
break;
case KVM_CHECK_EXTENSION:
r = kvm_dev_ioctl_check_extension((long)argp);
r = kvm_dev_ioctl_check_extension(arg);
break;
case KVM_GET_VCPU_MMAP_SIZE:
r = -EINVAL;
Expand Down

0 comments on commit 1e1c65e

Please sign in to comment.