Commit e40d37cc authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: osd: remove MemAlloc wrapper

Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0e727613
...@@ -260,8 +260,7 @@ VmbusChannelOpen( ...@@ -260,8 +260,7 @@ VmbusChannelOpen(
SendRingBufferSize); SendRingBufferSize);
// Create and init the channel open message // Create and init the channel open message
openInfo = openInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL));
ASSERT(openInfo != NULL); ASSERT(openInfo != NULL);
openInfo->WaitEvent = WaitEventCreate(); openInfo->WaitEvent = WaitEventCreate();
...@@ -630,8 +629,7 @@ VmbusChannelTeardownGpadl( ...@@ -630,8 +629,7 @@ VmbusChannelTeardownGpadl(
ASSERT(GpadlHandle != 0); ASSERT(GpadlHandle != 0);
info = info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN), GFP_KERNEL);
(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN));
ASSERT(info != NULL); ASSERT(info != NULL);
info->WaitEvent = WaitEventCreate(); info->WaitEvent = WaitEventCreate();
...@@ -693,8 +691,7 @@ VmbusChannelClose( ...@@ -693,8 +691,7 @@ VmbusChannelClose(
TimerStop(Channel->PollTimer); TimerStop(Channel->PollTimer);
// Send a closing message // Send a closing message
info = info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL);
(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL));
ASSERT(info != NULL); ASSERT(info != NULL);
//info->waitEvent = WaitEventCreate(); //info->waitEvent = WaitEventCreate();
......
...@@ -731,8 +731,7 @@ VmbusChannelRequestOffers( ...@@ -731,8 +731,7 @@ VmbusChannelRequestOffers(
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
msgInfo = msgInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER), GFP_KERNEL);
(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER));
ASSERT(msgInfo != NULL); ASSERT(msgInfo != NULL);
msgInfo->WaitEvent = WaitEventCreate(); msgInfo->WaitEvent = WaitEventCreate();
......
...@@ -305,7 +305,7 @@ HvInit ( ...@@ -305,7 +305,7 @@ HvInit (
(unsigned long)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT); (unsigned long)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT);
// Setup the global signal event param for the signal event hypercall // Setup the global signal event param for the signal event hypercall
gHvContext.SignalEventBuffer = MemAlloc(sizeof(HV_INPUT_SIGNAL_EVENT_BUFFER)); gHvContext.SignalEventBuffer = kmalloc(sizeof(HV_INPUT_SIGNAL_EVENT_BUFFER), GFP_KERNEL);
if (!gHvContext.SignalEventBuffer) if (!gHvContext.SignalEventBuffer)
{ {
goto Cleanup; goto Cleanup;
......
...@@ -361,7 +361,7 @@ NetVscInitializeReceiveBufferWithNetVsp( ...@@ -361,7 +361,7 @@ NetVscInitializeReceiveBufferWithNetVsp(
netDevice->ReceiveSectionCount = initPacket->Messages.Version1Messages.SendReceiveBufferComplete.NumSections; netDevice->ReceiveSectionCount = initPacket->Messages.Version1Messages.SendReceiveBufferComplete.NumSections;
netDevice->ReceiveSections = MemAlloc(netDevice->ReceiveSectionCount * sizeof(NVSP_1_RECEIVE_BUFFER_SECTION)); netDevice->ReceiveSections = kmalloc(netDevice->ReceiveSectionCount * sizeof(NVSP_1_RECEIVE_BUFFER_SECTION), GFP_KERNEL);
if (netDevice->ReceiveSections == NULL) if (netDevice->ReceiveSections == NULL)
{ {
ret = -1; ret = -1;
......
...@@ -943,7 +943,6 @@ RndisFilterOnDeviceAdd( ...@@ -943,7 +943,6 @@ RndisFilterOnDeviceAdd(
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
//rndisDevice = MemAlloc(sizeof(RNDIS_DEVICE));
rndisDevice = GetRndisDevice(); rndisDevice = GetRndisDevice();
if (!rndisDevice) if (!rndisDevice)
{ {
......
...@@ -121,7 +121,6 @@ extern void PageFree(void* page, unsigned int count); ...@@ -121,7 +121,6 @@ extern void PageFree(void* page, unsigned int count);
extern void* MemMapIO(unsigned long phys, unsigned long size); extern void* MemMapIO(unsigned long phys, unsigned long size);
extern void MemUnmapIO(void* virt); extern void MemUnmapIO(void* virt);
extern void* MemAlloc(unsigned int size);
extern void* MemAllocZeroed(unsigned int size); extern void* MemAllocZeroed(unsigned int size);
extern void* MemAllocAtomic(unsigned int size); extern void* MemAllocAtomic(unsigned int size);
extern void MemFree(void* buf); extern void MemFree(void* buf);
......
...@@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr) ...@@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr)
kunmap_atomic(VirtAddr, KM_IRQ0); kunmap_atomic(VirtAddr, KM_IRQ0);
} }
void* MemAlloc(unsigned int size)
{
return kmalloc(size, GFP_KERNEL);
}
void* MemAllocZeroed(unsigned int size) void* MemAllocZeroed(unsigned int size)
{ {
void *p = kmalloc(size, GFP_KERNEL); void *p = kmalloc(size, GFP_KERNEL);
......
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