staging: unisys: clean up vmcall functions
authorBenjamin Romer <benjamin.romer@unisys.com>
Tue, 5 Aug 2014 18:57:53 +0000 (14:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:07 +0000 (12:23 -0700)
Clean up the format of the vmcall functions in iovmcall_gnuc.h. These functions
are rewritten for clarity and to correct the indention, without changing any
functionality.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h

index 55437f7e130106efd09f02d2a6087152e99c86e8..57dd93e0cc83f9f32ea1e7d8405e69844f606f0a 100644 (file)
@@ -22,13 +22,11 @@ __unisys_vmcall_gnuc(unsigned long tuple, unsigned long reg_ebx,
        unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;
 
        cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
-       if (cpuid_ecx & 0x80000000) {
-             __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
-                                  "a"(tuple), "b"(reg_ebx), "c"(reg_ecx)
-                                     );
-       } else {
-               result = -1;
-       }
+       if (!(cpuid_ecx & 0x80000000))
+               return -1;
+
+       __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
+               "a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
        return result;
 }
 
@@ -42,12 +40,10 @@ __unisys_extended_vmcall_gnuc(unsigned long long tuple,
        unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;
 
        cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
-       if (cpuid_ecx & 0x80000000) {
-             __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
-                                  "a"(tuple), "b"(reg_ebx), "c"(reg_ecx),
-                                  "d"(reg_edx));
-       } else {
-               result = -1;
-       }
+       if (!(cpuid_ecx & 0x80000000))
+               return -1;
+
+       __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
+               "a"(tuple), "b"(reg_ebx), "c"(reg_ecx), "d"(reg_edx));
        return result;
-       }
+}
This page took 0.027588 seconds and 5 git commands to generate.