Staging: hv: osd: remove MemAlloc wrapper
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 15 Jul 2009 19:47:22 +0000 (12:47 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:47 +0000 (12:01 -0700)
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>
drivers/staging/hv/Channel.c
drivers/staging/hv/ChannelMgmt.c
drivers/staging/hv/Hv.c
drivers/staging/hv/NetVsc.c
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/include/osd.h
drivers/staging/hv/osd.c

index c16f67c69f2c9701beb590e4ecc9097bfb26fcc7..8d3bc9ae425e7d689b7cdc24f8451513ecb61c58 100644 (file)
@@ -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();
index ff9c9d033f7a8670f10a74dc21fabb90e39e11dd..eafc938cd22ea5fd2e3a4533a506e71b4ec78434 100644 (file)
@@ -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();
index 0e543ee9d5a680e0ec1b91443a79a7cf37b82a1a..4ddaf6e3ac17282e9db534745a03473a664057b6 100644 (file)
@@ -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;
index f3fd69ae18b98fd9575c6c94b2339defee60237a..e854f791b0f5a2046de57fa48bff1c46a22dcfbe 100644 (file)
@@ -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;
index 01507339e50371a3558390270c6b51db843d25fa..21b5ed76fac623a9d6d387a8cf291b20833a474b 100644 (file)
@@ -943,7 +943,6 @@ RndisFilterOnDeviceAdd(
 
        DPRINT_ENTER(NETVSC);
 
-       //rndisDevice = MemAlloc(sizeof(RNDIS_DEVICE));
        rndisDevice = GetRndisDevice();
        if (!rndisDevice)
        {
index e4bbea8c3bd9d6187f1ea6ab7882d926d55a7a9a..b5197e0fa9d7f140b0a2644ca0debdf43b50cef8 100644 (file)
@@ -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);
index 91668dffa3ebb97dd0a380389a39142c64d70f93..457698c01f8bac2165e2f9f750c529747424aff9 100644 (file)
@@ -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);