mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
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: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e276a3a578
commit
0a72f3cf9f
6 changed files with 4 additions and 11 deletions
|
@ -143,13 +143,12 @@ VMBUS_CHANNEL* AllocVmbusChannel(void)
|
||||||
{
|
{
|
||||||
VMBUS_CHANNEL* channel;
|
VMBUS_CHANNEL* channel;
|
||||||
|
|
||||||
channel = (VMBUS_CHANNEL*) MemAllocAtomic(sizeof(VMBUS_CHANNEL));
|
channel = kzalloc(sizeof(VMBUS_CHANNEL), GFP_ATOMIC);
|
||||||
if (!channel)
|
if (!channel)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(channel, 0,sizeof(VMBUS_CHANNEL));
|
|
||||||
channel->InboundLock = SpinlockCreate();
|
channel->InboundLock = SpinlockCreate();
|
||||||
if (!channel->InboundLock)
|
if (!channel->InboundLock)
|
||||||
{
|
{
|
||||||
|
|
|
@ -414,7 +414,7 @@ HvPostMessage(
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr = (unsigned long)MemAllocAtomic(sizeof(struct alignedInput));
|
addr = (unsigned long)kmalloc(sizeof(struct alignedInput), GFP_ATOMIC);
|
||||||
|
|
||||||
if (!addr)
|
if (!addr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1480,7 +1480,7 @@ NetVscOnChannelCallback(
|
||||||
}
|
}
|
||||||
else if (ret == -2) // Handle large packet
|
else if (ret == -2) // Handle large packet
|
||||||
{
|
{
|
||||||
buffer = MemAllocAtomic(bytesRecvd);
|
buffer = kmalloc(bytesRecvd, GFP_ATOMIC);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
{
|
{
|
||||||
// Try again next time around
|
// Try again next time around
|
||||||
|
|
|
@ -411,7 +411,7 @@ VmbusOnMsgDPC(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
copied = MemAllocAtomic(sizeof(HV_MESSAGE));
|
copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC);
|
||||||
if (copied == NULL)
|
if (copied == NULL)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -121,7 +121,6 @@ extern void PageFree(void* page, unsigned int count);
|
||||||
extern void* MemMapIO(unsigned long phys, unsigned long size);
|
extern void* MemMapIO(unsigned long phys, unsigned long size);
|
||||||
extern void MemUnmapIO(void* virt);
|
extern void MemUnmapIO(void* virt);
|
||||||
|
|
||||||
extern void* MemAllocAtomic(unsigned int size);
|
|
||||||
extern void MemFree(void* buf);
|
extern void MemFree(void* buf);
|
||||||
extern void MemoryFence(void);
|
extern void MemoryFence(void);
|
||||||
|
|
||||||
|
|
|
@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr)
|
||||||
kunmap_atomic(VirtAddr, KM_IRQ0);
|
kunmap_atomic(VirtAddr, KM_IRQ0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* MemAllocAtomic(unsigned int size)
|
|
||||||
{
|
|
||||||
return kmalloc(size, GFP_ATOMIC);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemFree(void* buf)
|
void MemFree(void* buf)
|
||||||
{
|
{
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
|
Loading…
Reference in a new issue