From: Greg Kroah-Hartman Date: Tue, 14 Jul 2009 22:08:20 +0000 (-0700) Subject: Staging: hv: remove UINT8 and INT8 typedefs X-Git-Tag: firefly_0821_release~12948^2~474 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5654e932262840f853233317689fc59536226d76;p=firefly-linux-kernel-4.4.55.git Staging: hv: remove UINT8 and INT8 typedefs The UINT8 and INT8 typedefs are now removed from the Hyper-V driver code. Had to include in a few places to get the build to work properly as well. Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c index be53e65b19ee..dc38232725b1 100644 --- a/drivers/staging/hv/BlkVsc.c +++ b/drivers/staging/hv/BlkVsc.c @@ -20,7 +20,7 @@ * */ - +#include #include "StorVsc.c" static const char* gBlkDriverName="blkvsc"; diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index 07fb5c7f91b7..04268b8309d6 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -21,7 +21,7 @@ * */ - +#include #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; diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index 9d8f4ef1e0b9..68f25805c353 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -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); diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h index 511b80fa22d6..06308a45dd7a 100644 --- a/drivers/staging/hv/ChannelMgmt.h +++ b/drivers/staging/hv/ChannelMgmt.h @@ -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; diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 72cc7e3ad790..11b78f4cf755 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -22,6 +22,7 @@ #define KERNEL_2_6_27 +#include #include "include/logging.h" #include "NetVsc.h" #include "RndisFilter.h" diff --git a/drivers/staging/hv/RingBuffer.h b/drivers/staging/hv/RingBuffer.h index f62f3d77c0de..a190b3a6d301 100644 --- a/drivers/staging/hv/RingBuffer.h +++ b/drivers/staging/hv/RingBuffer.h @@ -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 { diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index a455a89d7557..6d9ca8d46e53 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -23,6 +23,7 @@ #define KERNEL_2_6_27 +#include #include "include/logging.h" #include "include/NetVscApi.h" diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index d71fab2bfb30..7750d3224e7a 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c @@ -23,6 +23,7 @@ #define KERNEL_2_6_27 +#include #include "include/logging.h" #include "include/StorVscApi.h" diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index ace782471acf..8bfec126e0a5 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -21,7 +21,7 @@ * */ - +#include #include "include/logging.h" #include "VersionInfo.h" #include "VmbusPrivate.h" diff --git a/drivers/staging/hv/include/ChannelMessages.h b/drivers/staging/hv/include/ChannelMessages.h index 27a88ea6df5e..95d3601d2147 100644 --- a/drivers/staging/hv/include/ChannelMessages.h +++ b/drivers/staging/hv/include/ChannelMessages.h @@ -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; diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h index dd4fa0eb37ee..0c3700bb0ed8 100644 --- a/drivers/staging/hv/include/HvSynicApi.h +++ b/drivers/staging/hv/include/HvSynicApi.h @@ -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; diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h index 95e9c551dfef..7c4dd15d7d1d 100644 --- a/drivers/staging/hv/include/StorVscApi.h +++ b/drivers/staging/hv/include/StorVscApi.h @@ -75,7 +75,7 @@ typedef struct _STORVSC_REQUEST { UINT32 Bus; UINT32 TargetId; UINT32 LunId; - UINT8* Cdb; + u8 * Cdb; UINT32 CdbLen; UINT32 Status; UINT32 BytesXfer; diff --git a/drivers/staging/hv/include/VmbusPacketFormat.h b/drivers/staging/hv/include/VmbusPacketFormat.h index 372d9c0eef47..ff8dd2084e27 100644 --- a/drivers/staging/hv/include/VmbusPacketFormat.h +++ b/drivers/staging/hv/include/VmbusPacketFormat.h @@ -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]; diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index c78dd62cf5f5..d5f2a91cd574 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -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__