Commit 0a72f3cf authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: osd: remove MemAllocAtomic 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 e276a3a5
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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
......
......@@ -411,7 +411,7 @@ VmbusOnMsgDPC(
}
else
{
copied = MemAllocAtomic(sizeof(HV_MESSAGE));
copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC);
if (copied == NULL)
{
continue;
......
......@@ -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);
......
......@@ -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);
......
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