summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-08-05 14:57:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-16 12:23:07 -0700
commitffe58457492be4bea21d38abf4b84ad3e11abfff (patch)
tree1f3857c440b34a66ad929cb095651fdc7b6d5a73 /drivers/staging/unisys
parent3c1a653b90d7b3a681a7e49feef32e3e290b36f0 (diff)
downloadlinux-ffe58457492be4bea21d38abf4b84ad3e11abfff.tar.gz
linux-ffe58457492be4bea21d38abf4b84ad3e11abfff.tar.bz2
linux-ffe58457492be4bea21d38abf4b84ad3e11abfff.zip
staging: unisys: clean up vmcall functions
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>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h b/drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h
index 55437f7e1301..57dd93e0cc83 100644
--- a/drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h
+++ b/drivers/staging/unisys/common-spar/include/iovmcall_gnuc.h
@@ -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;
- }
+}