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>
{
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)
{
return -1;
}
- addr = (unsigned long)MemAllocAtomic(sizeof(struct alignedInput));
+ addr = (unsigned long)kmalloc(sizeof(struct alignedInput), GFP_ATOMIC);
if (!addr)
{
}
else if (ret == -2) // Handle large packet
{
- buffer = MemAllocAtomic(bytesRecvd);
+ buffer = kmalloc(bytesRecvd, GFP_ATOMIC);
if (buffer == NULL)
{
// Try again next time around
}
else
{
- copied = MemAllocAtomic(sizeof(HV_MESSAGE));
+ copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC);
if (copied == NULL)
{
continue;
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);
kunmap_atomic(VirtAddr, KM_IRQ0);
}
-void* MemAllocAtomic(unsigned int size)
-{
- return kmalloc(size, GFP_ATOMIC);
-}
-
void MemFree(void* buf)
{
kfree(buf);