staging: unisys: iovmcall_gnuc.h change -1 return values
authorErik Arfvidson <erik.arfvidson@unisys.com>
Sat, 14 May 2016 03:17:21 +0000 (23:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 05:58:16 +0000 (22:58 -0700)
This patch changes the vague -1 return values to -EPERM.
This operation is not supported is a good alternative
to -1 because the return is basically telling the caller
that the processor doesn't support vmcall operations.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/iovmcall_gnuc.h

index b08b6ecc8d31e26e6b23d4b30f737c539178233f..98ea7f381a3c845c05bd84150c2fa2f5607fc6de 100644 (file)
@@ -22,7 +22,7 @@ __unisys_vmcall_gnuc(unsigned long tuple, unsigned long reg_ebx,
 
        cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
        if (!(cpuid_ecx & 0x80000000))
-               return -1;
+               return -EPERM;
 
        __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
                "a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
@@ -40,7 +40,7 @@ __unisys_extended_vmcall_gnuc(unsigned long long tuple,
 
        cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
        if (!(cpuid_ecx & 0x80000000))
-               return -1;
+               return -EPERM;
 
        __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
                "a"(tuple), "b"(reg_ebx), "c"(reg_ecx), "d"(reg_edx));