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: Greg Kroah-Hartman <gregkh@suse.de>
//
static int
VmbusChannelCreateGpadlHeader(
- PVOID Kbuffer, // must be phys and virt contiguous
+ void * Kbuffer, // must be phys and virt contiguous
UINT32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **msgInfo,
UINT32 *MessageCount
VMBUS_CHANNEL *NewChannel,
UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize,
- PVOID UserData,
+ void * UserData,
UINT32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
- PVOID Context
+ void * Context
)
{
int ret=0;
--*/
static int
VmbusChannelCreateGpadlHeader(
- PVOID Kbuffer, // from kmalloc()
+ void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **MsgInfo,
UINT32 *MessageCount)
int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
- PVOID Kbuffer, // from kmalloc()
+ void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
UINT32 *GpadlHandle
)
int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
- const PVOID Buffer,
+ const void * Buffer,
UINT32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
)
VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
)
int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
VMBUS_CHANNEL *Channel,
UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize,
- PVOID UserData,
+ void * UserData,
UINT32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
- PVOID Context
+ void * Context
);
static void
static int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
- const PVOID Buffer,
+ const void * Buffer,
UINT32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
);
VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
);
static int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
- PVOID Kbuffer, // from kmalloc()
+ void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
UINT32 *GpadlHandle
);
static int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
static int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
PDEVICE_OBJECT Device,
UINT32 SendBufferSize,
UINT32 RecvRingBufferSize,
- PVOID UserData,
+ void * UserData,
UINT32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
- PVOID Context
+ void * Context
)
{
return VmbusChannelOpen( (VMBUS_CHANNEL*)Device->context,
static int
IVmbusChannelSendPacket(
PDEVICE_OBJECT Device,
- const PVOID Buffer,
+ const void * Buffer,
UINT32 BufferLen,
UINT64 RequestId,
UINT32 Type,
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
)
IVmbusChannelSendPacketMultiPageBuffer(
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
)
static int
IVmbusChannelRecvPacket (
PDEVICE_OBJECT Device,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
static int
IVmbusChannelRecvPacketRaw(
PDEVICE_OBJECT Device,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
static int
IVmbusChannelEstablishGpadl(
PDEVICE_OBJECT Device,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* GpadlHandle
)
static void
VmbusChannelProcessOffer(
- PVOID context
+ void * context
);
static void
VmbusChannelProcessRescindOffer(
- PVOID context
+ void * context
);
--*/
static void
VmbusChannelProcessOffer(
- PVOID context
+ void * context
)
{
int ret=0;
--*/
static void
VmbusChannelProcessRescindOffer(
- PVOID context
+ void * context
)
{
VMBUS_CHANNEL* channel=(VMBUS_CHANNEL*)context;
-typedef void (*PFN_CHANNEL_CALLBACK)(PVOID context);
+typedef void (*PFN_CHANNEL_CALLBACK)(void * context);
typedef enum {
CHANNEL_OFFER_STATE,
//HANDLE dataWorkQueue;
PFN_CHANNEL_CALLBACK OnChannelCallback;
- PVOID ChannelCallbackContext;
+ void * ChannelCallbackContext;
} VMBUS_CHANNEL;
msg->VMBusVersionRequested = VMBUS_REVISION_NUMBER;
msg->InterruptPage = GetPhysicalAddress(gVmbusConnection.InterruptPage);
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
// before returning from this routine
--*/
static void
VmbusProcessChannelEvent(
- PVOID context
+ void * context
)
{
VMBUS_CHANNEL* channel;
--*/
int
VmbusPostMessage(
- PVOID buffer,
+ void * buffer,
SIZE_T bufferLen
)
{
HvPostMessage(
HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType,
- PVOID payload,
+ void * payload,
SIZE_T payloadSize
)
{
HvPostMessage(
HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType,
- PVOID payload,
+ void * payload,
SIZE_T payloadSize
);
static void
NetVscOnChannelCallback(
- PVOID context
+ void * context
);
static int
static void
NetVscOnReceiveCompletion(
- PVOID Context
+ void * Context
);
static void
//
static void
NetVscOnReceiveCompletion(
- PVOID Context)
+ void * Context)
{
NETVSC_PACKET *packet = (NETVSC_PACKET*)Context;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
void
NetVscOnChannelCallback(
- PVOID Context
+ void * Context
)
{
const int netPacketSize=2048;
HANDLE ReceivePacketListLock;
// Send buffer allocated by us but manages by NetVSP
- PVOID SendBuffer;
+ void * SendBuffer;
UINT32 SendBufferSize;
UINT32 SendBufferGpadlHandle;
UINT32 SendSectionSize;
// Receive buffer allocated by us but manages by NetVSP
- PVOID ReceiveBuffer;
+ void * ReceiveBuffer;
UINT32 ReceiveBufferSize;
UINT32 ReceiveBufferGpadlHandle;
UINT32 ReceiveSectionCount;
Get the start of the ring buffer
--*/
-static inline PVOID
+static inline void *
GetRingBuffer(RING_BUFFER_INFO* RingInfo)
{
- return (PVOID)RingInfo->RingBuffer->Buffer;
+ return (void *)RingInfo->RingBuffer->Buffer;
}
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset,
- PVOID Src,
+ void * Src,
UINT32 SrcLen);
static UINT32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
- PVOID Dest,
+ void * Dest,
UINT32 DestLen,
UINT32 StartReadOffset);
int
RingBufferRead(
RING_BUFFER_INFO* InRingInfo,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32 Offset
)
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset,
- PVOID Src,
+ void * Src,
UINT32 SrcLen)
{
- PVOID ringBuffer=GetRingBuffer(RingInfo);
+ void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen;
UINT32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
- PVOID Dest,
+ void * Dest,
UINT32 DestLen,
UINT32 StartReadOffset)
{
- PVOID ringBuffer=GetRingBuffer(RingInfo);
+ void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen;
#include "include/osd.h"
typedef struct _SG_BUFFER_LIST {
- PVOID Data;
+ void * Data;
UINT32 Length;
} SG_BUFFER_LIST;
static int
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen
);
static int
RingBufferPeek(
RING_BUFFER_INFO *RingInfo,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen
);
static int
RingBufferRead(
RING_BUFFER_INFO *RingInfo,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32 Offset
);
static void
StorVscOnChannelCallback(
- PVOID Context
+ void * Context
);
static void
ret = Device->Driver->VmbusChannelInterface.Open(Device,
storDriver->RingBufferSize,
storDriver->RingBufferSize,
- (PVOID)&props,
+ (void *)&props,
sizeof(VMSTORAGE_CHANNEL_PROPERTIES),
StorVscOnChannelCallback,
Device
void
StorVscOnChannelCallback(
- PVOID Context
+ void * Context
)
{
int ret=0;
static int
VmbusPostMessage(
- PVOID buffer,
+ void * buffer,
SIZE_T bufSize
);
typedef void (*PFN_QUERY_LINKSTATUS)(DEVICE_OBJECT *Device);
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 void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status);
union {
struct{
UINT64 ReceiveCompletionTid;
- PVOID ReceiveCompletionContext;
+ void * ReceiveCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion;
} Recv;
struct{
UINT64 SendCompletionTid;
- PVOID SendCompletionContext;
+ void * SendCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnSendCompletion;
} Send;
} Completion;
// This points to the memory after PageBuffers
- PVOID Extension;
+ void * Extension;
UINT32 TotalDataBufferLength;
// Points to the send/receive buffer where the ethernet frame is
UCHAR* SenseBuffer;
UINT32 SenseBufferSize;
- PVOID Context;
+ void * Context;
PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion;
// This points to the memory after DataBuffer
- PVOID Extension;
+ void * Extension;
MULTIPAGE_BUFFER DataBuffer;
} STORVSC_REQUEST;
typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(PDEVICE_OBJECT Device);
// Vmbus channel interface
-typedef void (*VMBUS_CHANNEL_CALLBACK)(PVOID context);
+typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context);
typedef int (*VMBUS_CHANNEL_OPEN)(
PDEVICE_OBJECT Device,
UINT32 SendBufferSize,
UINT32 RecvRingBufferSize,
- PVOID UserData,
+ void * UserData,
UINT32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
- PVOID Context
+ void * Context
);
typedef void (*VMBUS_CHANNEL_CLOSE)(
typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device,
- const PVOID Buffer,
+ const void * Buffer,
UINT32 BufferLen,
UINT64 RequestId,
UINT32 Type,
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
);
typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT64 RequestId
);
typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
PDEVICE_OBJECT Device,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
PDEVICE_OBJECT Device,
- PVOID Buffer,
+ void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
UINT64* RequestId
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
PDEVICE_OBJECT Device,
- PVOID Buffer, // from kmalloc()
+ void * Buffer, // from kmalloc()
UINT32 BufferLen, // page-size multiple
UINT32* GpadlHandle
);
} VMPACKET_LARGEST_POSSIBLE_HEADER, *PVMPACKET_LARGEST_POSSIBLE_HEADER;
#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) \
((((PVMPACKET_DESCRIPTOR)__packet)->Length8 - ((PVMPACKET_DESCRIPTOR)__packet)->DataOffset8) * 8)
typedef unsigned long SIZE_T;
typedef void VOID;
//typedef unsigned char GUID[16];
-typedef void* PVOID;
typedef unsigned char BOOL;
typedef unsigned char BOOLEAN;
typedef void* HANDLE;
void* Physical2LogicalAddr(ULONG_PTR PhysAddr);
#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 PageUnmapVirtualAddress(void* VirtAddr);
// get pointer to contained message from NDIS_MESSAGE pointer
#define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \
- ((PVOID) &RndisMessage->Message)
+ ((void *) &RndisMessage->Message)
// get pointer to contained message from NDIS_MESSAGE pointer
#define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(RndisMessage) \
- ((PVOID) RndisMessage)
+ ((void *) RndisMessage)
#endif // _RNDIS_H_
return logicalAddr;
}
-ULONG_PTR Logical2PhysicalAddr(PVOID LogicalAddr)
+ULONG_PTR Logical2PhysicalAddr(void * LogicalAddr)
{
BUG_ON(!virt_addr_valid(LogicalAddr));
return virt_to_phys(LogicalAddr);
}
-ULONG_PTR Virtual2Physical(PVOID VirtAddr)
+ULONG_PTR Virtual2Physical(void * VirtAddr)
{
ULONG_PTR pfn = vmalloc_to_pfn(VirtAddr);