diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-14 15:12:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:46 -0700 |
commit | c4b0bc94828a86cfb6a975b0e0d92dc1cd389565 (patch) | |
tree | d67ad0683d5f196baa70e9040021dbac0bf8e2fe /drivers/staging/hv/NetVsc.c | |
parent | b509bf5badcd30b1c163349a87a56933b59663e1 (diff) |
Staging: hv: remove ULONG_PTR typedef
The ULONG_PTR 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>
Diffstat (limited to 'drivers/staging/hv/NetVsc.c')
-rw-r--r-- | drivers/staging/hv/NetVsc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 99855637739..8515bcd7e06 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -298,7 +298,7 @@ NetVscInitializeReceiveBufferWithNetVsp( ret = -1; goto Cleanup; } - ASSERT(((ULONG_PTR)netDevice->ReceiveBuffer & (PAGE_SIZE-1)) == 0); // page-aligned buffer + ASSERT(((unsigned long)netDevice->ReceiveBuffer & (PAGE_SIZE-1)) == 0); // page-aligned buffer DPRINT_INFO(NETVSC, "Establishing receive buffer's GPADL..."); @@ -333,7 +333,7 @@ NetVscInitializeReceiveBufferWithNetVsp( ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, initPacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)initPacket, + (unsigned long)initPacket, VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) @@ -425,7 +425,7 @@ NetVscInitializeSendBufferWithNetVsp( ret = -1; goto Cleanup; } - ASSERT(((ULONG_PTR)netDevice->SendBuffer & (PAGE_SIZE-1)) == 0); // page-aligned buffer + ASSERT(((unsigned long)netDevice->SendBuffer & (PAGE_SIZE-1)) == 0); // page-aligned buffer DPRINT_INFO(NETVSC, "Establishing send buffer's GPADL..."); @@ -460,7 +460,7 @@ NetVscInitializeSendBufferWithNetVsp( ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, initPacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)initPacket, + (unsigned long)initPacket, VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) @@ -521,7 +521,7 @@ NetVscDestroyReceiveBuffer( ret = NetDevice->Device->Driver->VmbusChannelInterface.SendPacket(NetDevice->Device, revokePacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)revokePacket, + (unsigned long)revokePacket, VmbusPacketTypeDataInBand, 0); // If we failed here, we might as well return and have a leak rather than continue and a bugchk @@ -602,7 +602,7 @@ NetVscDestroySendBuffer( ret = NetDevice->Device->Driver->VmbusChannelInterface.SendPacket(NetDevice->Device, revokePacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)revokePacket, + (unsigned long)revokePacket, VmbusPacketTypeDataInBand, 0); // If we failed here, we might as well return and have a leak rather than continue and a bugchk @@ -681,7 +681,7 @@ NetVscConnectToVsp( ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, initPacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)initPacket, + (unsigned long)initPacket, VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -728,7 +728,7 @@ NetVscConnectToVsp( ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, initPacket, sizeof(NVSP_MESSAGE), - (ULONG_PTR)initPacket, + (unsigned long)initPacket, VmbusPacketTypeDataInBand, 0); if (ret != 0) @@ -1000,7 +1000,7 @@ NetVscOnSendCompletion( return; } - nvspPacket = (NVSP_MESSAGE*)((ULONG_PTR)Packet + (Packet->DataOffset8 << 3)); + nvspPacket = (NVSP_MESSAGE*)((unsigned long)Packet + (Packet->DataOffset8 << 3)); DPRINT_DBG(NETVSC, "send completion packet - type %d", nvspPacket->Header.MessageType); @@ -1015,7 +1015,7 @@ NetVscOnSendCompletion( else if (nvspPacket->Header.MessageType == NvspMessage1TypeSendRNDISPacketComplete) { // Get the send context - nvscPacket = (NETVSC_PACKET *)(ULONG_PTR)Packet->TransactionId; + nvscPacket = (NETVSC_PACKET *)(unsigned long)Packet->TransactionId; ASSERT(nvscPacket); // Notify the layer above us @@ -1072,14 +1072,14 @@ NetVscOnSend( Packet->PageBufferCount, &sendMessage, sizeof(NVSP_MESSAGE), - (ULONG_PTR)Packet); + (unsigned long)Packet); } else { ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, &sendMessage, sizeof(NVSP_MESSAGE), - (ULONG_PTR)Packet, + (unsigned long)Packet, VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); @@ -1109,8 +1109,8 @@ NetVscOnReceive( NVSP_MESSAGE *nvspPacket; NETVSC_PACKET *netvscPacket=NULL; LIST_ENTRY* entry; - ULONG_PTR start; - ULONG_PTR end, endVirtual; + unsigned long start; + unsigned long end, endVirtual; //NETVSC_DRIVER_OBJECT *netvscDriver; XFERPAGE_PACKET *xferpagePacket=NULL; LIST_ENTRY listHead; @@ -1136,7 +1136,7 @@ NetVscOnReceive( return; } - nvspPacket = (NVSP_MESSAGE*)((ULONG_PTR)Packet + (Packet->DataOffset8 << 3)); + nvspPacket = (NVSP_MESSAGE*)((unsigned long)Packet + (Packet->DataOffset8 << 3)); // Make sure this is a valid nvsp packet if (nvspPacket->Header.MessageType != NvspMessage1TypeSendRNDISPacket ) @@ -1230,10 +1230,10 @@ NetVscOnReceive( netvscPacket->PageBuffers[0].Length = vmxferpagePacket->Ranges[i].ByteCount; - start = GetPhysicalAddress((void*)((ULONG_PTR)netDevice->ReceiveBuffer + vmxferpagePacket->Ranges[i].ByteOffset)); + start = GetPhysicalAddress((void*)((unsigned long)netDevice->ReceiveBuffer + vmxferpagePacket->Ranges[i].ByteOffset)); netvscPacket->PageBuffers[0].Pfn = start >> PAGE_SHIFT; - endVirtual = (ULONG_PTR)netDevice->ReceiveBuffer + endVirtual = (unsigned long)netDevice->ReceiveBuffer + vmxferpagePacket->Ranges[i].ByteOffset + vmxferpagePacket->Ranges[i].ByteCount -1; end = GetPhysicalAddress((void*)endVirtual); |