Staging: hv: osd: remove MemAllocAtomic wrapper
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 15 Jul 2009 19:48:01 +0000 (12:48 -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/ChannelMgmt.c
drivers/staging/hv/Hv.c
drivers/staging/hv/NetVsc.c
drivers/staging/hv/Vmbus.c
drivers/staging/hv/include/osd.h
drivers/staging/hv/osd.c

index eafc938cd22ea5fd2e3a4533a506e71b4ec78434..44bc61ef47df1afb40caf1e8b1d328e69c1e0260 100644 (file)
@@ -143,13 +143,12 @@ VMBUS_CHANNEL* AllocVmbusChannel(void)
 {
        VMBUS_CHANNEL* channel;
 
-       channel = (VMBUS_CHANNEL*) MemAllocAtomic(sizeof(VMBUS_CHANNEL));
+       channel = kzalloc(sizeof(VMBUS_CHANNEL), GFP_ATOMIC);
        if (!channel)
        {
                return NULL;
        }
 
-       memset(channel, 0,sizeof(VMBUS_CHANNEL));
        channel->InboundLock = SpinlockCreate();
        if (!channel->InboundLock)
        {
index 4ddaf6e3ac17282e9db534745a03473a664057b6..5ac9006672e30d288e759b3d7c975930ddc9a423 100644 (file)
@@ -414,7 +414,7 @@ HvPostMessage(
                return -1;
        }
 
-       addr = (unsigned long)MemAllocAtomic(sizeof(struct alignedInput));
+       addr = (unsigned long)kmalloc(sizeof(struct alignedInput), GFP_ATOMIC);
 
        if (!addr)
        {
index 61132e48fef8efc9ebaa9c40b27bcdc0ae358272..3fb44cd895d00395934d0cf134afbb8004312cfb 100644 (file)
@@ -1480,7 +1480,7 @@ NetVscOnChannelCallback(
                }
                else if (ret == -2) // Handle large packet
                {
-                       buffer = MemAllocAtomic(bytesRecvd);
+                       buffer = kmalloc(bytesRecvd, GFP_ATOMIC);
                        if (buffer == NULL)
                        {
                                // Try again next time around
index 080594dcbbb16ccfb1801e9e803358db79fc2049..4ad40be0bdfcda7fd3f9523adeaedef593836770 100644 (file)
@@ -411,7 +411,7 @@ VmbusOnMsgDPC(
                }
                else
                {
-                       copied = MemAllocAtomic(sizeof(HV_MESSAGE));
+                       copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC);
                        if (copied == NULL)
                        {
                                continue;
index 9ee98d87a84a69895e97d83262dc73c9147bfff2..586e8881114fe8076bbb43ff559d887ee1cad384 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* MemAllocAtomic(unsigned int size);
 extern void MemFree(void* buf);
 extern void MemoryFence(void);
 
index 02eb11d1f7d5e5ec74d371238bb227646de8d2ec..7a90c37c04f9ea57fcebfe5a3aea20b0243839cf 100644 (file)
@@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr)
        kunmap_atomic(VirtAddr, KM_IRQ0);
 }
 
-void* MemAllocAtomic(unsigned int size)
-{
-       return kmalloc(size, GFP_ATOMIC);
-}
-
 void MemFree(void* buf)
 {
        kfree(buf);