Commit 420beac4 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: hv: remove WaitEventClose()

All WaitEventClose() close did was call kfree(), so get rid of it and
replace it with a call to kfree()
Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent de65a384
...@@ -309,7 +309,7 @@ Cleanup: ...@@ -309,7 +309,7 @@ Cleanup:
REMOVE_ENTRY_LIST(&openInfo->MsgListEntry); REMOVE_ENTRY_LIST(&openInfo->MsgListEntry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
WaitEventClose(openInfo->WaitEvent); kfree(openInfo->WaitEvent);
kfree(openInfo); kfree(openInfo);
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
...@@ -596,7 +596,7 @@ Cleanup: ...@@ -596,7 +596,7 @@ Cleanup:
REMOVE_ENTRY_LIST(&msgInfo->MsgListEntry); REMOVE_ENTRY_LIST(&msgInfo->MsgListEntry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
WaitEventClose(msgInfo->WaitEvent); kfree(msgInfo->WaitEvent);
kfree(msgInfo); kfree(msgInfo);
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
...@@ -658,7 +658,7 @@ VmbusChannelTeardownGpadl( ...@@ -658,7 +658,7 @@ VmbusChannelTeardownGpadl(
REMOVE_ENTRY_LIST(&info->MsgListEntry); REMOVE_ENTRY_LIST(&info->MsgListEntry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
WaitEventClose(info->WaitEvent); kfree(info->WaitEvent);
kfree(info); kfree(info);
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
......
...@@ -762,7 +762,7 @@ VmbusChannelRequestOffers( ...@@ -762,7 +762,7 @@ VmbusChannelRequestOffers(
Cleanup: Cleanup:
if (msgInfo) if (msgInfo)
{ {
WaitEventClose(msgInfo->WaitEvent); kfree(msgInfo->WaitEvent);
kfree(msgInfo); kfree(msgInfo);
} }
......
...@@ -155,7 +155,7 @@ VmbusConnect(void) ...@@ -155,7 +155,7 @@ VmbusConnect(void)
} }
WaitEventClose(msgInfo->WaitEvent); kfree(msgInfo->WaitEvent);
kfree(msgInfo); kfree(msgInfo);
DPRINT_EXIT(VMBUS); DPRINT_EXIT(VMBUS);
...@@ -183,7 +183,7 @@ Cleanup: ...@@ -183,7 +183,7 @@ Cleanup:
if (msgInfo) if (msgInfo)
{ {
if (msgInfo->WaitEvent) if (msgInfo->WaitEvent)
WaitEventClose(msgInfo->WaitEvent); kfree(msgInfo->WaitEvent);
kfree(msgInfo); kfree(msgInfo);
} }
......
...@@ -880,7 +880,7 @@ Cleanup: ...@@ -880,7 +880,7 @@ Cleanup:
if (netDevice) if (netDevice)
{ {
WaitEventClose(netDevice->ChannelInitEvent); kfree(netDevice->ChannelInitEvent);
while (!IsListEmpty(&netDevice->ReceivePacketList)) while (!IsListEmpty(&netDevice->ReceivePacketList))
{ {
...@@ -963,7 +963,7 @@ NetVscOnDeviceRemove( ...@@ -963,7 +963,7 @@ NetVscOnDeviceRemove(
kfree(netvscPacket); kfree(netvscPacket);
} }
WaitEventClose(netDevice->ChannelInitEvent); kfree(netDevice->ChannelInitEvent);
FreeNetDevice(netDevice); FreeNetDevice(netDevice);
DPRINT_EXIT(NETVSC); DPRINT_EXIT(NETVSC);
......
...@@ -273,7 +273,7 @@ static inline void PutRndisRequest(RNDIS_DEVICE *Device, RNDIS_REQUEST *Request) ...@@ -273,7 +273,7 @@ static inline void PutRndisRequest(RNDIS_DEVICE *Device, RNDIS_REQUEST *Request)
REMOVE_ENTRY_LIST(&Request->ListEntry); REMOVE_ENTRY_LIST(&Request->ListEntry);
spin_unlock_irqrestore(&Device->request_lock, flags); spin_unlock_irqrestore(&Device->request_lock, flags);
WaitEventClose(Request->WaitEvent); kfree(Request->WaitEvent);
kfree(Request); kfree(Request);
} }
......
...@@ -516,7 +516,7 @@ static int StorVscChannelInit(struct hv_device *Device) ...@@ -516,7 +516,7 @@ static int StorVscChannelInit(struct hv_device *Device)
Cleanup: Cleanup:
if (request->WaitEvent) if (request->WaitEvent)
{ {
WaitEventClose(request->WaitEvent); kfree(request->WaitEvent);
request->WaitEvent = NULL; request->WaitEvent = NULL;
} }
...@@ -678,7 +678,7 @@ StorVscOnHostReset( ...@@ -678,7 +678,7 @@ StorVscOnHostReset(
/* FIXME: Add a timeout */ /* FIXME: Add a timeout */
WaitEventWait(request->WaitEvent); WaitEventWait(request->WaitEvent);
WaitEventClose(request->WaitEvent); kfree(request->WaitEvent);
DPRINT_INFO(STORVSC, "host adapter reset completed"); DPRINT_INFO(STORVSC, "host adapter reset completed");
/* /*
......
...@@ -134,7 +134,6 @@ extern int TimerStop(struct osd_timer *t); ...@@ -134,7 +134,6 @@ extern int TimerStop(struct osd_timer *t);
extern void TimerStart(struct osd_timer *t, u32 expirationInUs); extern void TimerStart(struct osd_timer *t, u32 expirationInUs);
extern struct osd_waitevent *WaitEventCreate(void); extern struct osd_waitevent *WaitEventCreate(void);
extern void WaitEventClose(struct osd_waitevent *waitEvent);
extern void WaitEventSet(struct osd_waitevent *waitEvent); extern void WaitEventSet(struct osd_waitevent *waitEvent);
extern int WaitEventWait(struct osd_waitevent *waitEvent); extern int WaitEventWait(struct osd_waitevent *waitEvent);
......
...@@ -216,11 +216,6 @@ struct osd_waitevent *WaitEventCreate(void) ...@@ -216,11 +216,6 @@ struct osd_waitevent *WaitEventCreate(void)
return wait; return wait;
} }
void WaitEventClose(struct osd_waitevent *waitEvent)
{
kfree(waitEvent);
}
void WaitEventSet(struct osd_waitevent *waitEvent) void WaitEventSet(struct osd_waitevent *waitEvent)
{ {
waitEvent->condition = 1; waitEvent->condition = 1;
......
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