summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-08-20 12:09:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:01:57 -0700
commitf80b3d51a6708b5f14a59c53b1343db59efdda1e (patch)
tree1da7ba0a6bc22f22c6e6ee852470420ae99cdc8e /drivers
parent462eeeca0382fb00b3bd6db36a5ee9668a961eae (diff)
downloadop-kernel-dev-f80b3d51a6708b5f14a59c53b1343db59efdda1e.zip
op-kernel-dev-f80b3d51a6708b5f14a59c53b1343db59efdda1e.tar.gz
Staging: hv: coding style cleanups for HvPtApi.h
Fix up the typedefs in there as well. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/hv/Hv.c4
-rw-r--r--drivers/staging/hv/include/HvPtApi.h107
2 files changed, 51 insertions, 60 deletions
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index e48033ee..83d0cae 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -230,7 +230,7 @@ int HvInit (void)
{
int ret=0;
int maxLeaf;
- HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
+ union hv_x64_msr_hypercall_contents hypercallMsr;
void *virtAddr = NULL;
DPRINT_ENTER(VMBUS);
@@ -347,7 +347,7 @@ Description:
--*/
void HvCleanup (void)
{
- HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
+ union hv_x64_msr_hypercall_contents hypercallMsr;
DPRINT_ENTER(VMBUS);
diff --git a/drivers/staging/hv/include/HvPtApi.h b/drivers/staging/hv/include/HvPtApi.h
index c32dbf6..f6ddf46 100644
--- a/drivers/staging/hv/include/HvPtApi.h
+++ b/drivers/staging/hv/include/HvPtApi.h
@@ -21,66 +21,57 @@
*
*/
+#ifndef __HVVPTPI_H
+#define __HVVPTPI_H
-#pragma once
-
-
-/* Versioning definitions used for guests reporting themselves to the */
-/* hypervisor, and visa versa. */
-/* ================================================================== */
-
-
+/*
+ * Versioning definitions used for guests reporting themselves to the
+ * hypervisor, and visa versa.
+ */
/* Version info reported by guest OS's */
+enum hv_guest_os_vendor {
+ HvGuestOsVendorMicrosoft = 0x0001
+};
+
+enum hv_guest_os_microsoft_ids {
+ HvGuestOsMicrosoftUndefined = 0x00,
+ HvGuestOsMicrosoftMSDOS = 0x01,
+ HvGuestOsMicrosoftWindows3x = 0x02,
+ HvGuestOsMicrosoftWindows9x = 0x03,
+ HvGuestOsMicrosoftWindowsNT = 0x04,
+ HvGuestOsMicrosoftWindowsCE = 0x05
+};
-typedef enum _HV_GUEST_OS_VENDOR
-{
- HvGuestOsVendorMicrosoft = 0x0001
-
-} HV_GUEST_OS_VENDOR, *PHV_GUEST_OS_VENDOR;
-
-typedef enum _HV_GUEST_OS_MICROSOFT_IDS
-{
- HvGuestOsMicrosoftUndefined = 0x00,
- HvGuestOsMicrosoftMSDOS = 0x01,
- HvGuestOsMicrosoftWindows3x = 0x02,
- HvGuestOsMicrosoftWindows9x = 0x03,
- HvGuestOsMicrosoftWindowsNT = 0x04,
- HvGuestOsMicrosoftWindowsCE = 0x05
-
-} HV_GUEST_OS_MICROSOFT_IDS, *PHV_GUEST_OS_MICROSOFT_IDS;
-
-
-/* Declare the MSR used to identify the guest OS. */
-
-#define HV_X64_MSR_GUEST_OS_ID 0x40000000
-
-typedef union _HV_X64_MSR_GUEST_OS_ID_CONTENTS
-{
- u64 AsUINT64;
- struct
- {
- u64 BuildNumber : 16;
- u64 ServiceVersion : 8; /* Service Pack, etc. */
- u64 MinorVersion : 8;
- u64 MajorVersion : 8;
- u64 OsId : 8; /* HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS) */
- u64 VendorId : 16; /* HV_GUEST_OS_VENDOR */
- };
-} HV_X64_MSR_GUEST_OS_ID_CONTENTS, *PHV_X64_MSR_GUEST_OS_ID_CONTENTS;
-
-
-/* Declare the MSR used to setup pages used to communicate with the hypervisor. */
-
-#define HV_X64_MSR_HYPERCALL 0x40000001
+/*
+ * Declare the MSR used to identify the guest OS.
+ */
+#define HV_X64_MSR_GUEST_OS_ID 0x40000000
+
+union hv_x64_msr_guest_os_id_contents {
+ u64 AsUINT64;
+ struct {
+ u64 BuildNumber:16;
+ u64 ServiceVersion:8; /* Service Pack, etc. */
+ u64 MinorVersion:8;
+ u64 MajorVersion:8;
+ u64 OsId:8; /* enum hv_guest_os_microsoft_ids (if Vendor=MS) */
+ u64 VendorId:16; /* enum hv_guest_os_vendor */
+ };
+};
-typedef union _HV_X64_MSR_HYPERCALL_CONTENTS
-{
- u64 AsUINT64;
- struct
- {
- u64 Enable : 1;
- u64 Reserved : 11;
- u64 GuestPhysicalAddress : 52;
- };
-} HV_X64_MSR_HYPERCALL_CONTENTS, *PHV_X64_MSR_HYPERCALL_CONTENTS;
+/*
+ * Declare the MSR used to setup pages used to communicate with the hypervisor.
+ */
+#define HV_X64_MSR_HYPERCALL 0x40000001
+
+union hv_x64_msr_hypercall_contents {
+ u64 AsUINT64;
+ struct {
+ u64 Enable:1;
+ u64 Reserved:11;
+ u64 GuestPhysicalAddress:52;
+ };
+};
+
+#endif
OpenPOWER on IntegriCloud