KVM: Change return type of kvm_arch_vm_ioctl() to "int"
authorThomas Huth <thuth@redhat.com>
Wed, 8 Feb 2023 14:01:05 +0000 (15:01 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Mar 2023 14:18:07 +0000 (10:18 -0400)
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: Thomas Huth <thuth@redhat.com>
Acked-by: Anup Patel <anup@brainfault.org>
Message-Id: <20230208140105.655814-7-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/arm64/kvm/arm.c
arch/mips/kvm/mips.c
arch/powerpc/kvm/powerpc.c
arch/riscv/kvm/vm.c
arch/s390/kvm/kvm-s390.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h

index 3bd732eaf08725509f7f0991cb359d1c1c7672cc..a43e1cb3b7e97267bc22caf05c68b166acc2551d 100644 (file)
@@ -1439,8 +1439,7 @@ static int kvm_vm_ioctl_set_device_addr(struct kvm *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)
 {
        struct kvm *kvm = filp->private_data;
        void __user *argp = (void __user *)arg;
index 36c8991b5d39c47fcdaf629c4deaa375ed2c1cb5..884be4ef99dc1b553fa4a71bb25d6f1b0a617c43 100644 (file)
@@ -993,9 +993,9 @@ void kvm_arch_flush_remote_tlbs_memslot(struct kvm *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) {
        default:
index 4c5405fc55387028e33e26f83fac20c99a2e5316..c0bac9cf2d8734bd26f1cc4547cb3447df1ea78b 100644 (file)
@@ -2371,12 +2371,11 @@ static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp)
 }
 #endif
 
-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)
 {
        struct kvm *kvm __maybe_unused = filp->private_data;
        void __user *argp = (void __user *)arg;
-       long r;
+       int r;
 
        switch (ioctl) {
        case KVM_PPC_GET_PVINFO: {
index 65a964d7e70d89ec988b1e9b7392abd8cdfc7317..c13130ab459a42474929074d5b9168c38b0b4a0a 100644 (file)
@@ -87,8 +87,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        return r;
 }
 
-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)
 {
        return -EINVAL;
 }
index 7039abda6d49c7bd03451386398aa4c017bc180f..4c3edccb991189e99d9a6ed3711b34e73d4a10e9 100644 (file)
@@ -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,
-                      unsigned int ioctl, unsigned long arg)
+int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
 {
        struct kvm *kvm = filp->private_data;
        void __user *argp = (void __user *)arg;
index 4282daeaee847cc4b9c08d51261e7b1d1ed5151b..237c483b1230168e8bc4cb16e9bb1de7f392c9af 100644 (file)
@@ -6667,8 +6667,7 @@ static int kvm_vm_ioctl_set_clock(struct kvm *kvm, void __user *argp)
        return 0;
 }
 
-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)
 {
        struct kvm *kvm = filp->private_data;
        void __user *argp = (void __user *)arg;
index 8ada23756b0ec223b86eaa94945d070e3e7e9a16..90edc16d37e5982fbd88b818770fb7d647e40ebc 100644 (file)
@@ -1397,8 +1397,7 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level,
                        bool line_status);
 int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
                            struct kvm_enable_cap *cap);
-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 kvm_arch_vm_compat_ioctl(struct file *filp, unsigned int ioctl,
                              unsigned long arg);