Commit 8282c400 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: remove PVOID typedef

The PVOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2be1301b
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
// //
static int static int
VmbusChannelCreateGpadlHeader( VmbusChannelCreateGpadlHeader(
PVOID Kbuffer, // must be phys and virt contiguous void * Kbuffer, // must be phys and virt contiguous
UINT32 Size, // page-size multiple UINT32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **msgInfo, VMBUS_CHANNEL_MSGINFO **msgInfo,
UINT32 *MessageCount UINT32 *MessageCount
...@@ -204,10 +204,10 @@ VmbusChannelOpen( ...@@ -204,10 +204,10 @@ VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel, VMBUS_CHANNEL *NewChannel,
UINT32 SendRingBufferSize, UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize, UINT32 RecvRingBufferSize,
PVOID UserData, void * UserData,
UINT32 UserDataLen, UINT32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback, PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
PVOID Context void * Context
) )
{ {
int ret=0; int ret=0;
...@@ -392,7 +392,7 @@ static void DumpGpadlHeader( ...@@ -392,7 +392,7 @@ static void DumpGpadlHeader(
--*/ --*/
static int static int
VmbusChannelCreateGpadlHeader( VmbusChannelCreateGpadlHeader(
PVOID Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple UINT32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **MsgInfo, VMBUS_CHANNEL_MSGINFO **MsgInfo,
UINT32 *MessageCount) UINT32 *MessageCount)
...@@ -515,7 +515,7 @@ VmbusChannelCreateGpadlHeader( ...@@ -515,7 +515,7 @@ VmbusChannelCreateGpadlHeader(
int int
VmbusChannelEstablishGpadl( VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple UINT32 Size, // page-size multiple
UINT32 *GpadlHandle UINT32 *GpadlHandle
) )
...@@ -752,7 +752,7 @@ VmbusChannelClose( ...@@ -752,7 +752,7 @@ VmbusChannelClose(
int int
VmbusChannelSendPacket( VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const PVOID Buffer, const void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
...@@ -820,7 +820,7 @@ VmbusChannelSendPacketPageBuffer( ...@@ -820,7 +820,7 @@ VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, UINT32 PageCount,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
...@@ -902,7 +902,7 @@ int ...@@ -902,7 +902,7 @@ int
VmbusChannelSendPacketMultiPageBuffer( VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
...@@ -984,7 +984,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -984,7 +984,7 @@ VmbusChannelSendPacketMultiPageBuffer(
int int
VmbusChannelRecvPacket( VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -1061,7 +1061,7 @@ VmbusChannelRecvPacket( ...@@ -1061,7 +1061,7 @@ VmbusChannelRecvPacket(
int int
VmbusChannelRecvPacketRaw( VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
......
...@@ -67,10 +67,10 @@ VmbusChannelOpen( ...@@ -67,10 +67,10 @@ VmbusChannelOpen(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
UINT32 SendRingBufferSize, UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize, UINT32 RecvRingBufferSize,
PVOID UserData, void * UserData,
UINT32 UserDataLen, UINT32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback, PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
PVOID Context void * Context
); );
static void static void
...@@ -81,7 +81,7 @@ VmbusChannelClose( ...@@ -81,7 +81,7 @@ VmbusChannelClose(
static int static int
VmbusChannelSendPacket( VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
const PVOID Buffer, const void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
VMBUS_PACKET_TYPE Type, VMBUS_PACKET_TYPE Type,
...@@ -93,7 +93,7 @@ VmbusChannelSendPacketPageBuffer( ...@@ -93,7 +93,7 @@ VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, UINT32 PageCount,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -102,7 +102,7 @@ static int ...@@ -102,7 +102,7 @@ static int
VmbusChannelSendPacketMultiPageBuffer( VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -110,7 +110,7 @@ VmbusChannelSendPacketMultiPageBuffer( ...@@ -110,7 +110,7 @@ VmbusChannelSendPacketMultiPageBuffer(
static int static int
VmbusChannelEstablishGpadl( VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Kbuffer, // from kmalloc() void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple UINT32 Size, // page-size multiple
UINT32 *GpadlHandle UINT32 *GpadlHandle
); );
...@@ -124,7 +124,7 @@ VmbusChannelTeardownGpadl( ...@@ -124,7 +124,7 @@ VmbusChannelTeardownGpadl(
static int static int
VmbusChannelRecvPacket( VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -133,7 +133,7 @@ VmbusChannelRecvPacket( ...@@ -133,7 +133,7 @@ VmbusChannelRecvPacket(
static int static int
VmbusChannelRecvPacketRaw( VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel, VMBUS_CHANNEL *Channel,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
......
...@@ -28,10 +28,10 @@ IVmbusChannelOpen( ...@@ -28,10 +28,10 @@ IVmbusChannelOpen(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 SendBufferSize, UINT32 SendBufferSize,
UINT32 RecvRingBufferSize, UINT32 RecvRingBufferSize,
PVOID UserData, void * UserData,
UINT32 UserDataLen, UINT32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback, VMBUS_CHANNEL_CALLBACK ChannelCallback,
PVOID Context void * Context
) )
{ {
return VmbusChannelOpen( (VMBUS_CHANNEL*)Device->context, return VmbusChannelOpen( (VMBUS_CHANNEL*)Device->context,
...@@ -56,7 +56,7 @@ IVmbusChannelClose( ...@@ -56,7 +56,7 @@ IVmbusChannelClose(
static int static int
IVmbusChannelSendPacket( IVmbusChannelSendPacket(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const PVOID Buffer, const void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
UINT32 Type, UINT32 Type,
...@@ -76,7 +76,7 @@ IVmbusChannelSendPacketPageBuffer( ...@@ -76,7 +76,7 @@ IVmbusChannelSendPacketPageBuffer(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, UINT32 PageCount,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
...@@ -93,7 +93,7 @@ static int ...@@ -93,7 +93,7 @@ static int
IVmbusChannelSendPacketMultiPageBuffer( IVmbusChannelSendPacketMultiPageBuffer(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
) )
...@@ -108,7 +108,7 @@ IVmbusChannelSendPacketMultiPageBuffer( ...@@ -108,7 +108,7 @@ IVmbusChannelSendPacketMultiPageBuffer(
static int static int
IVmbusChannelRecvPacket ( IVmbusChannelRecvPacket (
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -124,7 +124,7 @@ IVmbusChannelRecvPacket ( ...@@ -124,7 +124,7 @@ IVmbusChannelRecvPacket (
static int static int
IVmbusChannelRecvPacketRaw( IVmbusChannelRecvPacketRaw(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -140,7 +140,7 @@ IVmbusChannelRecvPacketRaw( ...@@ -140,7 +140,7 @@ IVmbusChannelRecvPacketRaw(
static int static int
IVmbusChannelEstablishGpadl( IVmbusChannelEstablishGpadl(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* GpadlHandle UINT32* GpadlHandle
) )
......
...@@ -82,12 +82,12 @@ VmbusChannelOnVersionResponse( ...@@ -82,12 +82,12 @@ VmbusChannelOnVersionResponse(
static void static void
VmbusChannelProcessOffer( VmbusChannelProcessOffer(
PVOID context void * context
); );
static void static void
VmbusChannelProcessRescindOffer( VmbusChannelProcessRescindOffer(
PVOID context void * context
); );
...@@ -233,7 +233,7 @@ void FreeVmbusChannel(VMBUS_CHANNEL* Channel) ...@@ -233,7 +233,7 @@ void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
--*/ --*/
static void static void
VmbusChannelProcessOffer( VmbusChannelProcessOffer(
PVOID context void * context
) )
{ {
int ret=0; int ret=0;
...@@ -317,7 +317,7 @@ VmbusChannelProcessOffer( ...@@ -317,7 +317,7 @@ VmbusChannelProcessOffer(
--*/ --*/
static void static void
VmbusChannelProcessRescindOffer( VmbusChannelProcessRescindOffer(
PVOID context void * context
) )
{ {
VMBUS_CHANNEL* channel=(VMBUS_CHANNEL*)context; VMBUS_CHANNEL* channel=(VMBUS_CHANNEL*)context;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
typedef void (*PFN_CHANNEL_CALLBACK)(PVOID context); typedef void (*PFN_CHANNEL_CALLBACK)(void * context);
typedef enum { typedef enum {
CHANNEL_OFFER_STATE, CHANNEL_OFFER_STATE,
...@@ -70,7 +70,7 @@ typedef struct _VMBUS_CHANNEL { ...@@ -70,7 +70,7 @@ typedef struct _VMBUS_CHANNEL {
//HANDLE dataWorkQueue; //HANDLE dataWorkQueue;
PFN_CHANNEL_CALLBACK OnChannelCallback; PFN_CHANNEL_CALLBACK OnChannelCallback;
PVOID ChannelCallbackContext; void * ChannelCallbackContext;
} VMBUS_CHANNEL; } VMBUS_CHANNEL;
......
...@@ -103,7 +103,7 @@ VmbusConnect( ...@@ -103,7 +103,7 @@ VmbusConnect(
msg->VMBusVersionRequested = VMBUS_REVISION_NUMBER; msg->VMBusVersionRequested = VMBUS_REVISION_NUMBER;
msg->InterruptPage = GetPhysicalAddress(gVmbusConnection.InterruptPage); msg->InterruptPage = GetPhysicalAddress(gVmbusConnection.InterruptPage);
msg->MonitorPage1 = GetPhysicalAddress(gVmbusConnection.MonitorPages); msg->MonitorPage1 = GetPhysicalAddress(gVmbusConnection.MonitorPages);
msg->MonitorPage2 = GetPhysicalAddress((PVOID)((ULONG_PTR)gVmbusConnection.MonitorPages + PAGE_SIZE)); msg->MonitorPage2 = GetPhysicalAddress((void *)((ULONG_PTR)gVmbusConnection.MonitorPages + PAGE_SIZE));
// Add to list before we send the request since we may receive the response // Add to list before we send the request since we may receive the response
// before returning from this routine // before returning from this routine
...@@ -290,7 +290,7 @@ GetChannelFromRelId( ...@@ -290,7 +290,7 @@ GetChannelFromRelId(
--*/ --*/
static void static void
VmbusProcessChannelEvent( VmbusProcessChannelEvent(
PVOID context void * context
) )
{ {
VMBUS_CHANNEL* channel; VMBUS_CHANNEL* channel;
...@@ -385,7 +385,7 @@ VmbusOnEvents( ...@@ -385,7 +385,7 @@ VmbusOnEvents(
--*/ --*/
int int
VmbusPostMessage( VmbusPostMessage(
PVOID buffer, void * buffer,
SIZE_T bufferLen SIZE_T bufferLen
) )
{ {
......
...@@ -396,7 +396,7 @@ HV_STATUS ...@@ -396,7 +396,7 @@ HV_STATUS
HvPostMessage( HvPostMessage(
HV_CONNECTION_ID connectionId, HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType, HV_MESSAGE_TYPE messageType,
PVOID payload, void * payload,
SIZE_T payloadSize SIZE_T payloadSize
) )
{ {
......
...@@ -162,7 +162,7 @@ static HV_STATUS ...@@ -162,7 +162,7 @@ static HV_STATUS
HvPostMessage( HvPostMessage(
HV_CONNECTION_ID connectionId, HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType, HV_MESSAGE_TYPE messageType,
PVOID payload, void * payload,
SIZE_T payloadSize SIZE_T payloadSize
); );
......
...@@ -59,7 +59,7 @@ NetVscOnCleanup( ...@@ -59,7 +59,7 @@ NetVscOnCleanup(
static void static void
NetVscOnChannelCallback( NetVscOnChannelCallback(
PVOID context void * context
); );
static int static int
...@@ -107,7 +107,7 @@ NetVscOnReceive( ...@@ -107,7 +107,7 @@ NetVscOnReceive(
static void static void
NetVscOnReceiveCompletion( NetVscOnReceiveCompletion(
PVOID Context void * Context
); );
static void static void
...@@ -1337,7 +1337,7 @@ NetVscSendReceiveCompletion( ...@@ -1337,7 +1337,7 @@ NetVscSendReceiveCompletion(
// //
static void static void
NetVscOnReceiveCompletion( NetVscOnReceiveCompletion(
PVOID Context) void * Context)
{ {
NETVSC_PACKET *packet = (NETVSC_PACKET*)Context; NETVSC_PACKET *packet = (NETVSC_PACKET*)Context;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device; DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
...@@ -1393,7 +1393,7 @@ NetVscOnReceiveCompletion( ...@@ -1393,7 +1393,7 @@ NetVscOnReceiveCompletion(
void void
NetVscOnChannelCallback( NetVscOnChannelCallback(
PVOID Context void * Context
) )
{ {
const int netPacketSize=2048; const int netPacketSize=2048;
......
...@@ -65,13 +65,13 @@ typedef struct _NETVSC_DEVICE { ...@@ -65,13 +65,13 @@ typedef struct _NETVSC_DEVICE {
HANDLE ReceivePacketListLock; HANDLE ReceivePacketListLock;
// Send buffer allocated by us but manages by NetVSP // Send buffer allocated by us but manages by NetVSP
PVOID SendBuffer; void * SendBuffer;
UINT32 SendBufferSize; UINT32 SendBufferSize;
UINT32 SendBufferGpadlHandle; UINT32 SendBufferGpadlHandle;
UINT32 SendSectionSize; UINT32 SendSectionSize;
// Receive buffer allocated by us but manages by NetVSP // Receive buffer allocated by us but manages by NetVSP
PVOID ReceiveBuffer; void * ReceiveBuffer;
UINT32 ReceiveBufferSize; UINT32 ReceiveBufferSize;
UINT32 ReceiveBufferGpadlHandle; UINT32 ReceiveBufferGpadlHandle;
UINT32 ReceiveSectionCount; UINT32 ReceiveSectionCount;
......
...@@ -156,10 +156,10 @@ SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation) ...@@ -156,10 +156,10 @@ SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation)
Get the start of the ring buffer Get the start of the ring buffer
--*/ --*/
static inline PVOID static inline void *
GetRingBuffer(RING_BUFFER_INFO* RingInfo) GetRingBuffer(RING_BUFFER_INFO* RingInfo)
{ {
return (PVOID)RingInfo->RingBuffer->Buffer; return (void *)RingInfo->RingBuffer->Buffer;
} }
...@@ -228,13 +228,13 @@ static UINT32 ...@@ -228,13 +228,13 @@ static UINT32
CopyToRingBuffer( CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset, UINT32 StartWriteOffset,
PVOID Src, void * Src,
UINT32 SrcLen); UINT32 SrcLen);
static UINT32 static UINT32
CopyFromRingBuffer( CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
PVOID Dest, void * Dest,
UINT32 DestLen, UINT32 DestLen,
UINT32 StartReadOffset); UINT32 StartReadOffset);
...@@ -486,7 +486,7 @@ RingBufferPeek( ...@@ -486,7 +486,7 @@ RingBufferPeek(
int int
RingBufferRead( RingBufferRead(
RING_BUFFER_INFO* InRingInfo, RING_BUFFER_INFO* InRingInfo,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32 Offset UINT32 Offset
) )
...@@ -557,10 +557,10 @@ UINT32 ...@@ -557,10 +557,10 @@ UINT32
CopyToRingBuffer( CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset, UINT32 StartWriteOffset,
PVOID Src, void * Src,
UINT32 SrcLen) UINT32 SrcLen)
{ {
PVOID ringBuffer=GetRingBuffer(RingInfo); void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo); UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen; UINT32 fragLen;
...@@ -597,11 +597,11 @@ CopyToRingBuffer( ...@@ -597,11 +597,11 @@ CopyToRingBuffer(
UINT32 UINT32
CopyFromRingBuffer( CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
PVOID Dest, void * Dest,
UINT32 DestLen, UINT32 DestLen,
UINT32 StartReadOffset) UINT32 StartReadOffset)
{ {
PVOID ringBuffer=GetRingBuffer(RingInfo); void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo); UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen; UINT32 fragLen;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "include/osd.h" #include "include/osd.h"
typedef struct _SG_BUFFER_LIST { typedef struct _SG_BUFFER_LIST {
PVOID Data; void * Data;
UINT32 Length; UINT32 Length;
} SG_BUFFER_LIST; } SG_BUFFER_LIST;
...@@ -72,7 +72,7 @@ typedef struct _RING_BUFFER_DEBUG_INFO { ...@@ -72,7 +72,7 @@ typedef struct _RING_BUFFER_DEBUG_INFO {
static int static int
RingBufferInit( RingBufferInit(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
PVOID Buffer, void * Buffer,
UINT32 BufferLen UINT32 BufferLen
); );
...@@ -91,14 +91,14 @@ RingBufferWrite( ...@@ -91,14 +91,14 @@ RingBufferWrite(
static int static int
RingBufferPeek( RingBufferPeek(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
PVOID Buffer, void * Buffer,
UINT32 BufferLen UINT32 BufferLen
); );
static int static int
RingBufferRead( RingBufferRead(
RING_BUFFER_INFO *RingInfo, RING_BUFFER_INFO *RingInfo,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32 Offset UINT32 Offset
); );
......
...@@ -118,7 +118,7 @@ StorVscOnCleanup( ...@@ -118,7 +118,7 @@ StorVscOnCleanup(
static void static void
StorVscOnChannelCallback( StorVscOnChannelCallback(
PVOID Context void * Context
); );
static void static void
...@@ -530,7 +530,7 @@ StorVscConnectToVsp( ...@@ -530,7 +530,7 @@ StorVscConnectToVsp(
ret = Device->Driver->VmbusChannelInterface.Open(Device, ret = Device->Driver->VmbusChannelInterface.Open(Device,
storDriver->RingBufferSize, storDriver->RingBufferSize,
storDriver->RingBufferSize, storDriver->RingBufferSize,
(PVOID)&props, (void *)&props,
sizeof(VMSTORAGE_CHANNEL_PROPERTIES), sizeof(VMSTORAGE_CHANNEL_PROPERTIES),
StorVscOnChannelCallback, StorVscOnChannelCallback,
Device Device
...@@ -901,7 +901,7 @@ StorVscOnReceive( ...@@ -901,7 +901,7 @@ StorVscOnReceive(
void void
StorVscOnChannelCallback( StorVscOnChannelCallback(
PVOID Context void * Context
) )
{ {
int ret=0; int ret=0;
......
...@@ -148,7 +148,7 @@ VmbusDisconnect( ...@@ -148,7 +148,7 @@ VmbusDisconnect(
static int static int
VmbusPostMessage( VmbusPostMessage(
PVOID buffer, void * buffer,
SIZE_T bufSize SIZE_T bufSize
); );
......
...@@ -49,7 +49,7 @@ typedef int (*PFN_ON_CLOSE)(DEVICE_OBJECT *Device); ...@@ -49,7 +49,7 @@ typedef int (*PFN_ON_CLOSE)(DEVICE_OBJECT *Device);
typedef void (*PFN_QUERY_LINKSTATUS)(DEVICE_OBJECT *Device); typedef void (*PFN_QUERY_LINKSTATUS)(DEVICE_OBJECT *Device);
typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_SENDRECVCOMPLETION)(PVOID Context); typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status); typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status);
...@@ -80,18 +80,18 @@ typedef struct _NETVSC_PACKET { ...@@ -80,18 +80,18 @@ typedef struct _NETVSC_PACKET {
union { union {
struct{ struct{
UINT64 ReceiveCompletionTid; UINT64 ReceiveCompletionTid;
PVOID ReceiveCompletionContext; void * ReceiveCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion; PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion;
} Recv; } Recv;
struct{ struct{
UINT64 SendCompletionTid; UINT64 SendCompletionTid;
PVOID SendCompletionContext; void * SendCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnSendCompletion; PFN_ON_SENDRECVCOMPLETION OnSendCompletion;
} Send; } Send;
} Completion; } Completion;
// This points to the memory after PageBuffers // This points to the memory after PageBuffers
PVOID Extension; void * Extension;
UINT32 TotalDataBufferLength; UINT32 TotalDataBufferLength;
// Points to the send/receive buffer where the ethernet frame is // Points to the send/receive buffer where the ethernet frame is
......
...@@ -83,12 +83,12 @@ typedef struct _STORVSC_REQUEST { ...@@ -83,12 +83,12 @@ typedef struct _STORVSC_REQUEST {
UCHAR* SenseBuffer; UCHAR* SenseBuffer;
UINT32 SenseBufferSize; UINT32 SenseBufferSize;
PVOID Context; void * Context;
PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion; PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion;
// This points to the memory after DataBuffer // This points to the memory after DataBuffer
PVOID Extension; void * Extension;
MULTIPAGE_BUFFER DataBuffer; MULTIPAGE_BUFFER DataBuffer;
} STORVSC_REQUEST; } STORVSC_REQUEST;
......
...@@ -88,16 +88,16 @@ typedef int (*PFN_ON_CHILDDEVICE_ADD)(PDEVICE_OBJECT RootDevice, PDEVICE_OBJECT ...@@ -88,16 +88,16 @@ typedef int (*PFN_ON_CHILDDEVICE_ADD)(PDEVICE_OBJECT RootDevice, PDEVICE_OBJECT
typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(PDEVICE_OBJECT Device); typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(PDEVICE_OBJECT Device);
// Vmbus channel interface // Vmbus channel interface
typedef void (*VMBUS_CHANNEL_CALLBACK)(PVOID context); typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context);
typedef int (*VMBUS_CHANNEL_OPEN)( typedef int (*VMBUS_CHANNEL_OPEN)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
UINT32 SendBufferSize, UINT32 SendBufferSize,
UINT32 RecvRingBufferSize, UINT32 RecvRingBufferSize,
PVOID UserData, void * UserData,
UINT32 UserDataLen, UINT32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback, VMBUS_CHANNEL_CALLBACK ChannelCallback,
PVOID Context void * Context
); );
typedef void (*VMBUS_CHANNEL_CLOSE)( typedef void (*VMBUS_CHANNEL_CLOSE)(
...@@ -106,7 +106,7 @@ typedef void (*VMBUS_CHANNEL_CLOSE)( ...@@ -106,7 +106,7 @@ typedef void (*VMBUS_CHANNEL_CLOSE)(
typedef int (*VMBUS_CHANNEL_SEND_PACKET)( typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
const PVOID Buffer, const void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId, UINT64 RequestId,
UINT32 Type, UINT32 Type,
...@@ -117,7 +117,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)( ...@@ -117,7 +117,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[], PAGE_BUFFER PageBuffers[],
UINT32 PageCount, UINT32 PageCount,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
...@@ -125,14 +125,14 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)( ...@@ -125,14 +125,14 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)( typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer, MULTIPAGE_BUFFER *MultiPageBuffer,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT64 RequestId UINT64 RequestId
); );
typedef int (*VMBUS_CHANNEL_RECV_PACKET)( typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -140,7 +140,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET)( ...@@ -140,7 +140,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, void * Buffer,
UINT32 BufferLen, UINT32 BufferLen,
UINT32* BufferActualLen, UINT32* BufferActualLen,
UINT64* RequestId UINT64* RequestId
...@@ -148,7 +148,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( ...@@ -148,7 +148,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)( typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
PDEVICE_OBJECT Device, PDEVICE_OBJECT Device,
PVOID Buffer, // from kmalloc() void * Buffer, // from kmalloc()
UINT32 BufferLen, // page-size multiple UINT32 BufferLen, // page-size multiple
UINT32* GpadlHandle UINT32* GpadlHandle
); );
......
...@@ -287,7 +287,7 @@ typedef union { ...@@ -287,7 +287,7 @@ typedef union {
} VMPACKET_LARGEST_POSSIBLE_HEADER, *PVMPACKET_LARGEST_POSSIBLE_HEADER; } VMPACKET_LARGEST_POSSIBLE_HEADER, *PVMPACKET_LARGEST_POSSIBLE_HEADER;
#define VMPACKET_DATA_START_ADDRESS(__packet) \ #define VMPACKET_DATA_START_ADDRESS(__packet) \
(PVOID)(((PUCHAR)__packet) + ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8 * 8) (void *)(((PUCHAR)__packet) + ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8 * 8)
#define VMPACKET_DATA_LENGTH(__packet) \ #define VMPACKET_DATA_LENGTH(__packet) \
((((PVMPACKET_DESCRIPTOR)__packet)->Length8 - ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8) * 8) ((((PVMPACKET_DESCRIPTOR)__packet)->Length8 - ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8) * 8)
......
...@@ -133,7 +133,6 @@ typedef long long LONGLONG; ...@@ -133,7 +133,6 @@ typedef long long LONGLONG;
typedef unsigned long SIZE_T; typedef unsigned long SIZE_T;
typedef void VOID; typedef void VOID;
//typedef unsigned char GUID[16]; //typedef unsigned char GUID[16];
typedef void* PVOID;
typedef unsigned char BOOL; typedef unsigned char BOOL;
typedef unsigned char BOOLEAN; typedef unsigned char BOOLEAN;
typedef void* HANDLE; typedef void* HANDLE;
...@@ -246,9 +245,9 @@ extern void SpinlockRelease(HANDLE hSpin); ...@@ -246,9 +245,9 @@ extern void SpinlockRelease(HANDLE hSpin);
void* Physical2LogicalAddr(ULONG_PTR PhysAddr); void* Physical2LogicalAddr(ULONG_PTR PhysAddr);
#define GetPhysicalAddress Logical2PhysicalAddr #define GetPhysicalAddress Logical2PhysicalAddr
ULONG_PTR Logical2PhysicalAddr(PVOID LogicalAddr); ULONG_PTR Logical2PhysicalAddr(void * LogicalAddr);
ULONG_PTR Virtual2Physical(PVOID VirtAddr); ULONG_PTR Virtual2Physical(void * VirtAddr);
void* PageMapVirtualAddress(unsigned long Pfn); void* PageMapVirtualAddress(unsigned long Pfn);
void PageUnmapVirtualAddress(void* VirtAddr); void PageUnmapVirtualAddress(void* VirtAddr);
......
...@@ -827,10 +827,10 @@ typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE ...@@ -827,10 +827,10 @@ typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE
// get pointer to contained message from NDIS_MESSAGE pointer // get pointer to contained message from NDIS_MESSAGE pointer
#define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \ #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \
((PVOID) &RndisMessage->Message) ((void *) &RndisMessage->Message)
// get pointer to contained message from NDIS_MESSAGE pointer // get pointer to contained message from NDIS_MESSAGE pointer
#define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(RndisMessage) \ #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(RndisMessage) \
((PVOID) RndisMessage) ((void *) RndisMessage)
#endif // _RNDIS_H_ #endif // _RNDIS_H_
...@@ -414,14 +414,14 @@ void* Physical2LogicalAddr(ULONG_PTR PhysAddr) ...@@ -414,14 +414,14 @@ void* Physical2LogicalAddr(ULONG_PTR PhysAddr)
return logicalAddr; return logicalAddr;
} }
ULONG_PTR Logical2PhysicalAddr(PVOID LogicalAddr) ULONG_PTR Logical2PhysicalAddr(void * LogicalAddr)
{ {
BUG_ON(!virt_addr_valid(LogicalAddr)); BUG_ON(!virt_addr_valid(LogicalAddr));
return virt_to_phys(LogicalAddr); return virt_to_phys(LogicalAddr);
} }
ULONG_PTR Virtual2Physical(PVOID VirtAddr) ULONG_PTR Virtual2Physical(void * VirtAddr)
{ {
ULONG_PTR pfn = vmalloc_to_pfn(VirtAddr); ULONG_PTR pfn = vmalloc_to_pfn(VirtAddr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment