Commit d8708b80 authored by Thomas Huth's avatar Thomas Huth Committed by Paolo Bonzini

KVM: Change return type of kvm_arch_vm_ioctl() to "int"

All kvm_arch_vm_ioctl() implementations now only deal with "int"
types as return values, so we can change the return type of these
functions to use "int" instead of "long".
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Acked-by: default avatarAnup Patel <anup@brainfault.org>
Message-Id: <20230208140105.655814-7-thuth@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent f15ba52b
...@@ -1439,8 +1439,7 @@ static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm, ...@@ -1439,8 +1439,7 @@ static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm,
} }
} }
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
unsigned int ioctl, unsigned long arg)
{ {
struct kvm *kvm = filp->private_data; struct kvm *kvm = filp->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
......
...@@ -993,9 +993,9 @@ void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm, ...@@ -993,9 +993,9 @@ void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
kvm_flush_remote_tlbs(kvm); kvm_flush_remote_tlbs(kvm);
} }
long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
{ {
long r; int r;
switch (ioctl) { switch (ioctl) {
default: default:
......
...@@ -2371,12 +2371,11 @@ static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp) ...@@ -2371,12 +2371,11 @@ static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp)
} }
#endif #endif
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
unsigned int ioctl, unsigned long arg)
{ {
struct kvm *kvm __maybe_unused = filp->private_data; struct kvm *kvm __maybe_unused = filp->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
long r; int r;
switch (ioctl) { switch (ioctl) {
case KVM_PPC_GET_PVINFO: { case KVM_PPC_GET_PVINFO: {
......
...@@ -87,8 +87,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) ...@@ -87,8 +87,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
return r; return r;
} }
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
unsigned int ioctl, unsigned long arg)
{ {
return -EINVAL; return -EINVAL;
} }
...@@ -2898,8 +2898,7 @@ static int kvm_s390_vm_mem_op(struct kvm *kvm, struct kvm_s390_mem_op *mop) ...@@ -2898,8 +2898,7 @@ static int kvm_s390_vm_mem_op(struct kvm *kvm, struct kvm_s390_mem_op *mop)
} }
} }
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
unsigned int ioctl, unsigned long arg)
{ {
struct kvm *kvm = filp->private_data; struct kvm *kvm = filp->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
......
...@@ -6667,8 +6667,7 @@ static int kvm_vm_ioctl_set_clock(struct kvm *kvm, void __user *argp) ...@@ -6667,8 +6667,7 @@ static int kvm_vm_ioctl_set_clock(struct kvm *kvm, void __user *argp)
return 0; return 0;
} }
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
unsigned int ioctl, unsigned long arg)
{ {
struct kvm *kvm = filp->private_data; struct kvm *kvm = filp->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
......
...@@ -1397,8 +1397,7 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level, ...@@ -1397,8 +1397,7 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level,
bool line_status); bool line_status);
int kvm_vm_ioctl_enable_cap(struct kvm *kvm, int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
struct kvm_enable_cap *cap); struct kvm_enable_cap *cap);
long kvm_arch_vm_ioctl(struct file *filp, int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg);
unsigned int ioctl, unsigned long arg);
long kvm_arch_vm_compat_ioctl(struct file *filp, unsigned int ioctl, long kvm_arch_vm_compat_ioctl(struct file *filp, unsigned int ioctl,
unsigned long arg); unsigned long arg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment