diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 12:47:22 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:47 -0700 |
commit | e40d37cc002de9a6e3058646114b585ec4354745 (patch) | |
tree | cdf7c0212d1d947aaaafae18ca4d1f3e6d7a4b45 /drivers | |
parent | 0e727613ac6e1648d681a75d794862225c801d4b (diff) |
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/hv/Channel.c | 9 | ||||
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 3 | ||||
-rw-r--r-- | drivers/staging/hv/Hv.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/NetVsc.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/RndisFilter.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/include/osd.h | 1 | ||||
-rw-r--r-- | drivers/staging/hv/osd.c | 5 |
7 files changed, 6 insertions, 17 deletions
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index c16f67c69f2..8d3bc9ae425 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -260,8 +260,7 @@ VmbusChannelOpen( SendRingBufferSize); // Create and init the channel open message - openInfo = - (VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL)); + openInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL); ASSERT(openInfo != NULL); openInfo->WaitEvent = WaitEventCreate(); @@ -630,8 +629,7 @@ VmbusChannelTeardownGpadl( ASSERT(GpadlHandle != 0); - info = - (VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN)); + info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN), GFP_KERNEL); ASSERT(info != NULL); info->WaitEvent = WaitEventCreate(); @@ -693,8 +691,7 @@ VmbusChannelClose( TimerStop(Channel->PollTimer); // Send a closing message - info = - (VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL)); + info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL); ASSERT(info != NULL); //info->waitEvent = WaitEventCreate(); diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index ff9c9d033f7..eafc938cd22 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -731,8 +731,7 @@ VmbusChannelRequestOffers( DPRINT_ENTER(VMBUS); - msgInfo = - (VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER)); + msgInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER), GFP_KERNEL); ASSERT(msgInfo != NULL); msgInfo->WaitEvent = WaitEventCreate(); diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 0e543ee9d5a..4ddaf6e3ac1 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c @@ -305,7 +305,7 @@ HvInit ( (unsigned long)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT); // 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) { goto Cleanup; diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index f3fd69ae18b..e854f791b0f 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -361,7 +361,7 @@ NetVscInitializeReceiveBufferWithNetVsp( 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) { ret = -1; diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 01507339e50..21b5ed76fac 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -943,7 +943,6 @@ RndisFilterOnDeviceAdd( DPRINT_ENTER(NETVSC); - //rndisDevice = MemAlloc(sizeof(RNDIS_DEVICE)); rndisDevice = GetRndisDevice(); if (!rndisDevice) { diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index e4bbea8c3bd..b5197e0fa9d 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -121,7 +121,6 @@ extern void PageFree(void* page, unsigned int count); extern void* MemMapIO(unsigned long phys, unsigned long size); extern void MemUnmapIO(void* virt); -extern void* MemAlloc(unsigned int size); extern void* MemAllocZeroed(unsigned int size); extern void* MemAllocAtomic(unsigned int size); extern void MemFree(void* buf); diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 91668dffa3e..457698c01f8 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr) kunmap_atomic(VirtAddr, KM_IRQ0); } -void* MemAlloc(unsigned int size) -{ - return kmalloc(size, GFP_KERNEL); -} - void* MemAllocZeroed(unsigned int size) { void *p = kmalloc(size, GFP_KERNEL); |