Staging: hv: remove UINT8 and INT8 typedefs

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>
This commit is contained in:
Greg Kroah-Hartman 2009-07-14 15:08:20 -07:00
parent e20f683b64
commit 5654e93226
14 changed files with 26 additions and 25 deletions

View file

@ -20,7 +20,7 @@
* *
*/ */
#include <linux/kernel.h>
#include "StorVsc.c" #include "StorVsc.c"
static const char* gBlkDriverName="blkvsc"; static const char* gBlkDriverName="blkvsc";

View file

@ -21,7 +21,7 @@
* *
*/ */
#include <linux/kernel.h>
#include "include/osd.h" #include "include/osd.h"
#include "include/logging.h" #include "include/logging.h"
@ -162,8 +162,8 @@ VmbusChannelGetDebugInfo(
) )
{ {
HV_MONITOR_PAGE *monitorPage; HV_MONITOR_PAGE *monitorPage;
UINT8 monitorGroup = (UINT8)Channel->OfferMsg.MonitorId / 32; u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
UINT8 monitorOffset = (UINT8)Channel->OfferMsg.MonitorId % 32; u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
//UINT32 monitorBit = 1 << monitorOffset; //UINT32 monitorBit = 1 << monitorOffset;
DebugInfo->RelId = Channel->OfferMsg.ChildRelId; DebugInfo->RelId = Channel->OfferMsg.ChildRelId;

View file

@ -396,8 +396,8 @@ VmbusChannelOnOffer(
DPRINT_DBG(VMBUS, "channel object allocated - %p", newChannel); DPRINT_DBG(VMBUS, "channel object allocated - %p", newChannel);
memcpy(&newChannel->OfferMsg, offer, sizeof(VMBUS_CHANNEL_OFFER_CHANNEL)); memcpy(&newChannel->OfferMsg, offer, sizeof(VMBUS_CHANNEL_OFFER_CHANNEL));
newChannel->MonitorGroup = (UINT8)offer->MonitorId / 32; newChannel->MonitorGroup = (u8)offer->MonitorId / 32;
newChannel->MonitorBit = (UINT8)offer->MonitorId % 32; newChannel->MonitorBit = (u8)offer->MonitorId % 32;
// TODO: Make sure the offer comes from our parent partition // TODO: Make sure the offer comes from our parent partition
WorkQueueQueueWorkItem(newChannel->ControlWQ, VmbusChannelProcessOffer, newChannel); WorkQueueQueueWorkItem(newChannel->ControlWQ, VmbusChannelProcessOffer, newChannel);

View file

@ -53,8 +53,8 @@ typedef struct _VMBUS_CHANNEL {
VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg; VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
// These are based on the OfferMsg.MonitorId. Save it here for easy access. // These are based on the OfferMsg.MonitorId. Save it here for easy access.
UINT8 MonitorGroup; u8 MonitorGroup;
UINT8 MonitorBit; u8 MonitorBit;
UINT32 RingBufferGpadlHandle; UINT32 RingBufferGpadlHandle;

View file

@ -22,6 +22,7 @@
#define KERNEL_2_6_27 #define KERNEL_2_6_27
#include <linux/kernel.h>
#include "include/logging.h" #include "include/logging.h"
#include "NetVsc.h" #include "NetVsc.h"
#include "RndisFilter.h" #include "RndisFilter.h"

View file

@ -37,12 +37,12 @@ typedef struct _RING_BUFFER {
volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below
volatile UINT32 InterruptMask; 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 // 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. // also uses this data structure and its data starts here, we commented out this field.
// volatile UINT32 InterruptMask; // volatile UINT32 InterruptMask;
// Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!! // Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
UINT8 Buffer[0]; u8 Buffer[0];
} STRUCT_PACKED RING_BUFFER; } STRUCT_PACKED RING_BUFFER;
typedef struct _RING_BUFFER_INFO { typedef struct _RING_BUFFER_INFO {

View file

@ -23,6 +23,7 @@
#define KERNEL_2_6_27 #define KERNEL_2_6_27
#include <linux/kernel.h>
#include "include/logging.h" #include "include/logging.h"
#include "include/NetVscApi.h" #include "include/NetVscApi.h"

View file

@ -23,6 +23,7 @@
#define KERNEL_2_6_27 #define KERNEL_2_6_27
#include <linux/kernel.h>
#include "include/logging.h" #include "include/logging.h"
#include "include/StorVscApi.h" #include "include/StorVscApi.h"

View file

@ -21,7 +21,7 @@
* *
*/ */
#include <linux/kernel.h>
#include "include/logging.h" #include "include/logging.h"
#include "VersionInfo.h" #include "VersionInfo.h"
#include "VmbusPrivate.h" #include "VmbusPrivate.h"

View file

@ -91,7 +91,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL
VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_MESSAGE_HEADER Header;
VMBUS_CHANNEL_OFFER Offer; VMBUS_CHANNEL_OFFER Offer;
UINT32 ChildRelId; UINT32 ChildRelId;
UINT8 MonitorId; u8 MonitorId;
BOOLEAN MonitorAllocated; BOOLEAN MonitorAllocated;
} VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL; } VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL;

View file

@ -264,11 +264,11 @@ typedef const HV_CONNECTION_INFO *PCHV_CONNECTION_INFO;
typedef union _HV_MESSAGE_FLAGS typedef union _HV_MESSAGE_FLAGS
{ {
UINT8 AsUINT8; u8 Asu8;
struct struct
{ {
UINT8 MessagePending:1; u8 MessagePending:1;
UINT8 Reserved:7; u8 Reserved:7;
}; };
} HV_MESSAGE_FLAGS, *PHV_MESSAGE_FLAGS; } HV_MESSAGE_FLAGS, *PHV_MESSAGE_FLAGS;
@ -280,9 +280,9 @@ typedef union _HV_MESSAGE_FLAGS
typedef struct _HV_MESSAGE_HEADER typedef struct _HV_MESSAGE_HEADER
{ {
HV_MESSAGE_TYPE MessageType; HV_MESSAGE_TYPE MessageType;
UINT8 PayloadSize; u8 PayloadSize;
HV_MESSAGE_FLAGS MessageFlags; HV_MESSAGE_FLAGS MessageFlags;
UINT8 Reserved[2]; u8 Reserved[2];
union union
{ {
HV_PARTITION_ID Sender; HV_PARTITION_ID Sender;
@ -337,7 +337,7 @@ typedef struct _HV_MESSAGE_PAGE
typedef union _HV_SYNIC_EVENT_FLAGS 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]; UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
} HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS; } HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS;
@ -483,7 +483,7 @@ typedef struct _HV_MONITOR_PAGE
HV_MONITOR_PARAMETER Parameter[4][32]; HV_MONITOR_PARAMETER Parameter[4][32];
UINT8 RsvdZ4[1984]; u8 RsvdZ4[1984];
} HV_MONITOR_PAGE, *PHV_MONITOR_PAGE; } HV_MONITOR_PAGE, *PHV_MONITOR_PAGE;

View file

@ -75,7 +75,7 @@ typedef struct _STORVSC_REQUEST {
UINT32 Bus; UINT32 Bus;
UINT32 TargetId; UINT32 TargetId;
UINT32 LunId; UINT32 LunId;
UINT8* Cdb; u8 * Cdb;
UINT32 CdbLen; UINT32 CdbLen;
UINT32 Status; UINT32 Status;
UINT32 BytesXfer; UINT32 BytesXfer;

View file

@ -65,14 +65,14 @@ typedef struct
VMRCB Control; VMRCB Control;
}; };
UINT8 Reserved[PAGE_SIZE]; u8 Reserved[PAGE_SIZE];
}; };
// //
// Beginning of the ring data. Note: It must be guaranteed that // Beginning of the ring data. Note: It must be guaranteed that
// this data does not share a page with the control structure. // this data does not share a page with the control structure.
// //
UINT8 Data[1]; u8 Data[1];
} VMRING, *PVMRING; } VMRING, *PVMRING;
#pragma pack(push, 1) #pragma pack(push, 1)
@ -114,7 +114,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER {
UINT16 TransferPageSetId; UINT16 TransferPageSetId;
BOOLEAN SenderOwnsSet; BOOLEAN SenderOwnsSet;
UINT8 Reserved; u8 Reserved;
UINT32 RangeCount; UINT32 RangeCount;
VMTRANSFER_PAGE_RANGE Ranges[1]; VMTRANSFER_PAGE_RANGE Ranges[1];

View file

@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY {
// //
// unsigned types // unsigned types
// //
typedef unsigned char UINT8;
typedef unsigned short UINT16; typedef unsigned short UINT16;
typedef unsigned int UINT32; typedef unsigned int UINT32;
#ifdef __x86_64__ #ifdef __x86_64__
@ -114,7 +113,6 @@ typedef unsigned char UCHAR;
// //
// signed types // signed types
// //
typedef char INT8;
typedef short INT16; typedef short INT16;
typedef int INT32; typedef int INT32;
#ifdef __x86_64__ #ifdef __x86_64__