Staging: hv: remove UINT8 and INT8 typedefs
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Jul 2009 22:08:20 +0000 (15:08 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:46 +0000 (12:01 -0700)
The UINT8 and INT8 typedefs are now removed from the Hyper-V driver
code.

Had to include <linux/kernel.h> in a few places to get the
build to work properly as well.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 files changed:
drivers/staging/hv/BlkVsc.c
drivers/staging/hv/Channel.c
drivers/staging/hv/ChannelMgmt.c
drivers/staging/hv/ChannelMgmt.h
drivers/staging/hv/NetVsc.c
drivers/staging/hv/RingBuffer.h
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/StorVsc.c
drivers/staging/hv/Vmbus.c
drivers/staging/hv/include/ChannelMessages.h
drivers/staging/hv/include/HvSynicApi.h
drivers/staging/hv/include/StorVscApi.h
drivers/staging/hv/include/VmbusPacketFormat.h
drivers/staging/hv/include/osd.h

index be53e65..dc38232 100644 (file)
@@ -20,7 +20,7 @@
  *
  */
 
-
+#include <linux/kernel.h>
 #include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
index 07fb5c7..04268b8 100644 (file)
@@ -21,7 +21,7 @@
  *
  */
 
-
+#include <linux/kernel.h>
 #include "include/osd.h"
 #include "include/logging.h"
 
@@ -162,8 +162,8 @@ VmbusChannelGetDebugInfo(
        )
 {
        HV_MONITOR_PAGE *monitorPage;
-    UINT8 monitorGroup    = (UINT8)Channel->OfferMsg.MonitorId / 32;
-    UINT8 monitorOffset   = (UINT8)Channel->OfferMsg.MonitorId % 32;
+    u8 monitorGroup    = (u8)Channel->OfferMsg.MonitorId / 32;
+    u8 monitorOffset   = (u8)Channel->OfferMsg.MonitorId % 32;
        //UINT32 monitorBit     = 1 << monitorOffset;
 
        DebugInfo->RelId = Channel->OfferMsg.ChildRelId;
index 9d8f4ef..68f2580 100644 (file)
@@ -396,8 +396,8 @@ VmbusChannelOnOffer(
        DPRINT_DBG(VMBUS, "channel object allocated - %p", newChannel);
 
        memcpy(&newChannel->OfferMsg, offer, sizeof(VMBUS_CHANNEL_OFFER_CHANNEL));
-       newChannel->MonitorGroup = (UINT8)offer->MonitorId / 32;
-       newChannel->MonitorBit = (UINT8)offer->MonitorId % 32;
+       newChannel->MonitorGroup = (u8)offer->MonitorId / 32;
+       newChannel->MonitorBit = (u8)offer->MonitorId % 32;
 
        // TODO: Make sure the offer comes from our parent partition
        WorkQueueQueueWorkItem(newChannel->ControlWQ, VmbusChannelProcessOffer, newChannel);
index 511b80f..06308a4 100644 (file)
@@ -53,8 +53,8 @@ typedef struct _VMBUS_CHANNEL {
 
        VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
        // These are based on the OfferMsg.MonitorId. Save it here for easy access.
-       UINT8                                           MonitorGroup;
-       UINT8                                           MonitorBit;
+       u8                                              MonitorGroup;
+       u8                                              MonitorBit;
 
        UINT32                                          RingBufferGpadlHandle;
 
index 72cc7e3..11b78f4 100644 (file)
@@ -22,6 +22,7 @@
 
 #define KERNEL_2_6_27
 
+#include <linux/kernel.h>
 #include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
index f62f3d7..a190b3a 100644 (file)
@@ -37,12 +37,12 @@ typedef struct _RING_BUFFER {
     volatile UINT32    ReadIndex;      // Offset in bytes from the start of ring data below
 
        volatile UINT32 InterruptMask;
-       UINT8   Reserved[4084];                 // Pad it to PAGE_SIZE so that data starts on page boundary
+       u8      Reserved[4084];                 // Pad it to PAGE_SIZE so that data starts on page boundary
        // NOTE: The InterruptMask field is used only for channels but since our vmbus connection
        // also uses this data structure and its data starts here, we commented out this field.
        // volatile UINT32 InterruptMask;
        // Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
-    UINT8              Buffer[0];
+    u8         Buffer[0];
 } STRUCT_PACKED RING_BUFFER;
 
 typedef struct _RING_BUFFER_INFO {
index a455a89..6d9ca8d 100644 (file)
@@ -23,6 +23,7 @@
 
 #define KERNEL_2_6_27
 
+#include <linux/kernel.h>
 #include "include/logging.h"
 
 #include "include/NetVscApi.h"
index d71fab2..7750d32 100644 (file)
@@ -23,6 +23,7 @@
 
 #define KERNEL_2_6_27
 
+#include <linux/kernel.h>
 #include "include/logging.h"
 
 #include "include/StorVscApi.h"
index ace7824..8bfec12 100644 (file)
@@ -21,7 +21,7 @@
  *
  */
 
-
+#include <linux/kernel.h>
 #include "include/logging.h"
 #include "VersionInfo.h"
 #include "VmbusPrivate.h"
index 27a88ea..95d3601 100644 (file)
@@ -91,7 +91,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL
     VMBUS_CHANNEL_MESSAGE_HEADER Header;
     VMBUS_CHANNEL_OFFER Offer;
     UINT32  ChildRelId;
-    UINT8   MonitorId;
+    u8   MonitorId;
     BOOLEAN MonitorAllocated;
 } VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL;
 
index dd4fa0e..0c3700b 100644 (file)
@@ -264,11 +264,11 @@ typedef const HV_CONNECTION_INFO *PCHV_CONNECTION_INFO;
 
 typedef union _HV_MESSAGE_FLAGS
 {
-    UINT8 AsUINT8;
+    u8 Asu8;
     struct
     {
-        UINT8 MessagePending:1;
-        UINT8 Reserved:7;
+        u8 MessagePending:1;
+        u8 Reserved:7;
     };
 } HV_MESSAGE_FLAGS, *PHV_MESSAGE_FLAGS;
 
@@ -280,9 +280,9 @@ typedef union _HV_MESSAGE_FLAGS
 typedef struct _HV_MESSAGE_HEADER
 {
     HV_MESSAGE_TYPE     MessageType;
-    UINT8               PayloadSize;
+    u8               PayloadSize;
     HV_MESSAGE_FLAGS    MessageFlags;
-    UINT8               Reserved[2];
+    u8               Reserved[2];
     union
     {
         HV_PARTITION_ID Sender;
@@ -337,7 +337,7 @@ typedef struct _HV_MESSAGE_PAGE
 
 typedef union _HV_SYNIC_EVENT_FLAGS
 {
-    UINT8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
+    u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
     UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
 } HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS;
 
@@ -483,7 +483,7 @@ typedef struct _HV_MONITOR_PAGE
 
     HV_MONITOR_PARAMETER     Parameter[4][32];
 
-    UINT8                    RsvdZ4[1984];
+    u8                    RsvdZ4[1984];
 
 } HV_MONITOR_PAGE, *PHV_MONITOR_PAGE;
 
index 95e9c55..7c4dd15 100644 (file)
@@ -75,7 +75,7 @@ typedef struct _STORVSC_REQUEST {
        UINT32                                  Bus;
        UINT32                                  TargetId;
        UINT32                                  LunId;
-       UINT8*                                  Cdb;
+       u8 *                                    Cdb;
        UINT32                                  CdbLen;
        UINT32                                  Status;
        UINT32                                  BytesXfer;
index 372d9c0..ff8dd20 100644 (file)
@@ -65,14 +65,14 @@ typedef struct
             VMRCB Control;
         };
 
-        UINT8 Reserved[PAGE_SIZE];
+        u8 Reserved[PAGE_SIZE];
     };
 
     //
     // Beginning of the ring data.  Note: It must be guaranteed that
     // this data does not share a page with the control structure.
     //
-    UINT8 Data[1];
+    u8 Data[1];
 } VMRING, *PVMRING;
 
 #pragma pack(push, 1)
@@ -114,7 +114,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER {
 
     UINT16                  TransferPageSetId;
     BOOLEAN                 SenderOwnsSet;
-    UINT8                   Reserved;
+    u8                   Reserved;
     UINT32                  RangeCount;
     VMTRANSFER_PAGE_RANGE   Ranges[1];
 
index c78dd62..d5f2a91 100644 (file)
@@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY {
 //
 // unsigned types
 //
-typedef unsigned char          UINT8;
 typedef unsigned short         UINT16;
 typedef unsigned int           UINT32;
 #ifdef __x86_64__
@@ -114,7 +113,6 @@ typedef unsigned char               UCHAR;
 //
 // signed types
 //
-typedef char                           INT8;
 typedef short                          INT16;
 typedef int                                    INT32;
 #ifdef __x86_64__