Commit e98cb276 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

staging: hv: Convert camel cased functions in channel_mgmt.c to lower case

Convert camel cased functions in channel_mgmt.c to lower case
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 188963ec
...@@ -698,7 +698,7 @@ void vmbus_close(struct vmbus_channel *channel) ...@@ -698,7 +698,7 @@ void vmbus_close(struct vmbus_channel *channel)
list_del(&channel->ListEntry); list_del(&channel->ListEntry);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
FreeVmbusChannel(channel); free_channel(channel);
} }
} }
......
...@@ -235,9 +235,9 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = { ...@@ -235,9 +235,9 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = {
EXPORT_SYMBOL(hv_cb_utils); EXPORT_SYMBOL(hv_cb_utils);
/* /*
* AllocVmbusChannel - Allocate and initialize a vmbus channel object * alloc_channel - Allocate and initialize a vmbus channel object
*/ */
struct vmbus_channel *AllocVmbusChannel(void) struct vmbus_channel *alloc_channel(void)
{ {
struct vmbus_channel *channel; struct vmbus_channel *channel;
...@@ -261,9 +261,9 @@ struct vmbus_channel *AllocVmbusChannel(void) ...@@ -261,9 +261,9 @@ struct vmbus_channel *AllocVmbusChannel(void)
} }
/* /*
* ReleaseVmbusChannel - Release the vmbus channel object itself * release_hannel - Release the vmbus channel object itself
*/ */
static inline void ReleaseVmbusChannel(void *context) static inline void release_channel(void *context)
{ {
struct vmbus_channel *channel = context; struct vmbus_channel *channel = context;
...@@ -275,9 +275,9 @@ static inline void ReleaseVmbusChannel(void *context) ...@@ -275,9 +275,9 @@ static inline void ReleaseVmbusChannel(void *context)
} }
/* /*
* FreeVmbusChannel - Release the resources used by the vmbus channel object * free_channel - Release the resources used by the vmbus channel object
*/ */
void FreeVmbusChannel(struct vmbus_channel *channel) void free_channel(struct vmbus_channel *channel)
{ {
del_timer_sync(&channel->poll_timer); del_timer_sync(&channel->poll_timer);
...@@ -286,7 +286,7 @@ void FreeVmbusChannel(struct vmbus_channel *channel) ...@@ -286,7 +286,7 @@ void FreeVmbusChannel(struct vmbus_channel *channel)
* workqueue/thread context * workqueue/thread context
* ie we can't destroy ourselves. * ie we can't destroy ourselves.
*/ */
osd_schedule_callback(gVmbusConnection.WorkQueue, ReleaseVmbusChannel, osd_schedule_callback(gVmbusConnection.WorkQueue, release_channel,
channel); channel);
} }
...@@ -310,10 +310,10 @@ static void count_hv_channel(void) ...@@ -310,10 +310,10 @@ static void count_hv_channel(void)
/* /*
* VmbusChannelProcessOffer - Process the offer by creating a channel/device * vmbus_process_offer - Process the offer by creating a channel/device
* associated with this offer * associated with this offer
*/ */
static void VmbusChannelProcessOffer(void *context) static void vmbus_process_offer(void *context)
{ {
struct vmbus_channel *newchannel = context; struct vmbus_channel *newchannel = context;
struct vmbus_channel *channel; struct vmbus_channel *channel;
...@@ -346,7 +346,7 @@ static void VmbusChannelProcessOffer(void *context) ...@@ -346,7 +346,7 @@ static void VmbusChannelProcessOffer(void *context)
if (!fnew) { if (!fnew) {
DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)", DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
newchannel->OfferMsg.ChildRelId); newchannel->OfferMsg.ChildRelId);
FreeVmbusChannel(newchannel); free_channel(newchannel);
return; return;
} }
...@@ -378,7 +378,7 @@ static void VmbusChannelProcessOffer(void *context) ...@@ -378,7 +378,7 @@ static void VmbusChannelProcessOffer(void *context)
list_del(&newchannel->ListEntry); list_del(&newchannel->ListEntry);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
FreeVmbusChannel(newchannel); free_channel(newchannel);
} else { } else {
/* /*
* This state is used to indicate a successful open * This state is used to indicate a successful open
...@@ -406,9 +406,10 @@ static void VmbusChannelProcessOffer(void *context) ...@@ -406,9 +406,10 @@ static void VmbusChannelProcessOffer(void *context)
} }
/* /*
* VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal * vmbus_process_rescind_offer -
* Rescind the offer by initiating a device removal
*/ */
static void VmbusChannelProcessRescindOffer(void *context) static void vmbus_process_rescind_offer(void *context)
{ {
struct vmbus_channel *channel = context; struct vmbus_channel *channel = context;
...@@ -416,13 +417,13 @@ static void VmbusChannelProcessRescindOffer(void *context) ...@@ -416,13 +417,13 @@ static void VmbusChannelProcessRescindOffer(void *context)
} }
/* /*
* VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition. * vmbus_onoffer - Handler for channel offers from vmbus in parent partition.
* *
* We ignore all offers except network and storage offers. For each network and * We ignore all offers except network and storage offers. For each network and
* storage offers, we create a channel object and queue a work item to the * storage offers, we create a channel object and queue a work item to the
* channel object to process the offer synchronously * channel object to process the offer synchronously
*/ */
static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr) static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
{ {
struct vmbus_channel_offer_channel *offer; struct vmbus_channel_offer_channel *offer;
struct vmbus_channel *newchannel; struct vmbus_channel *newchannel;
...@@ -475,7 +476,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr) ...@@ -475,7 +476,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
guidinstance->data[14], guidinstance->data[15]); guidinstance->data[14], guidinstance->data[15]);
/* Allocate the channel object and save this offer. */ /* Allocate the channel object and save this offer. */
newchannel = AllocVmbusChannel(); newchannel = alloc_channel();
if (!newchannel) { if (!newchannel) {
DPRINT_ERR(VMBUS, "unable to allocate channel object"); DPRINT_ERR(VMBUS, "unable to allocate channel object");
return; return;
...@@ -489,16 +490,16 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr) ...@@ -489,16 +490,16 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
newchannel->MonitorBit = (u8)offer->MonitorId % 32; newchannel->MonitorBit = (u8)offer->MonitorId % 32;
/* TODO: Make sure the offer comes from our parent partition */ /* TODO: Make sure the offer comes from our parent partition */
osd_schedule_callback(newchannel->ControlWQ, VmbusChannelProcessOffer, osd_schedule_callback(newchannel->ControlWQ, vmbus_process_offer,
newchannel); newchannel);
} }
/* /*
* VmbusChannelOnOfferRescind - Rescind offer handler. * vmbus_onoffer_rescind - Rescind offer handler.
* *
* We queue a work item to process this offer synchronously * We queue a work item to process this offer synchronously
*/ */
static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr) static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
{ {
struct vmbus_channel_rescind_offer *rescind; struct vmbus_channel_rescind_offer *rescind;
struct vmbus_channel *channel; struct vmbus_channel *channel;
...@@ -512,28 +513,29 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr) ...@@ -512,28 +513,29 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
} }
osd_schedule_callback(channel->ControlWQ, osd_schedule_callback(channel->ControlWQ,
VmbusChannelProcessRescindOffer, vmbus_process_rescind_offer,
channel); channel);
} }
/* /*
* VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered. * vmbus_onoffers_delivered -
* This is invoked when all offers have been delivered.
* *
* Nothing to do here. * Nothing to do here.
*/ */
static void VmbusChannelOnOffersDelivered( static void vmbus_onoffers_delivered(
struct vmbus_channel_message_header *hdr) struct vmbus_channel_message_header *hdr)
{ {
} }
/* /*
* VmbusChannelOnOpenResult - Open result handler. * vmbus_onopen_result - Open result handler.
* *
* This is invoked when we received a response to our channel open request. * This is invoked when we received a response to our channel open request.
* Find the matching request, copy the response and signal the requesting * Find the matching request, copy the response and signal the requesting
* thread. * thread.
*/ */
static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr) static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
{ {
struct vmbus_channel_open_result *result; struct vmbus_channel_open_result *result;
struct list_head *curr; struct list_head *curr;
...@@ -573,13 +575,13 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr) ...@@ -573,13 +575,13 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
} }
/* /*
* VmbusChannelOnGpadlCreated - GPADL created handler. * vmbus_ongpadl_created - GPADL created handler.
* *
* This is invoked when we received a response to our gpadl create request. * This is invoked when we received a response to our gpadl create request.
* Find the matching request, copy the response and signal the requesting * Find the matching request, copy the response and signal the requesting
* thread. * thread.
*/ */
static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr) static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
{ {
struct vmbus_channel_gpadl_created *gpadlcreated; struct vmbus_channel_gpadl_created *gpadlcreated;
struct list_head *curr; struct list_head *curr;
...@@ -623,13 +625,13 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr) ...@@ -623,13 +625,13 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
} }
/* /*
* VmbusChannelOnGpadlTorndown - GPADL torndown handler. * vmbus_ongpadl_torndown - GPADL torndown handler.
* *
* This is invoked when we received a response to our gpadl teardown request. * This is invoked when we received a response to our gpadl teardown request.
* Find the matching request, copy the response and signal the requesting * Find the matching request, copy the response and signal the requesting
* thread. * thread.
*/ */
static void VmbusChannelOnGpadlTorndown( static void vmbus_ongpadl_torndown(
struct vmbus_channel_message_header *hdr) struct vmbus_channel_message_header *hdr)
{ {
struct vmbus_channel_gpadl_torndown *gpadl_torndown; struct vmbus_channel_gpadl_torndown *gpadl_torndown;
...@@ -669,13 +671,13 @@ static void VmbusChannelOnGpadlTorndown( ...@@ -669,13 +671,13 @@ static void VmbusChannelOnGpadlTorndown(
} }
/* /*
* VmbusChannelOnVersionResponse - Version response handler * vmbus_onversion_response - Version response handler
* *
* This is invoked when we received a response to our initiate contact request. * This is invoked when we received a response to our initiate contact request.
* Find the matching request, copy the response and signal the requesting * Find the matching request, copy the response and signal the requesting
* thread. * thread.
*/ */
static void VmbusChannelOnVersionResponse( static void vmbus_onversion_response(
struct vmbus_channel_message_header *hdr) struct vmbus_channel_message_header *hdr)
{ {
struct list_head *curr; struct list_head *curr;
...@@ -711,30 +713,30 @@ static void VmbusChannelOnVersionResponse( ...@@ -711,30 +713,30 @@ static void VmbusChannelOnVersionResponse(
static struct vmbus_channel_message_table_entry static struct vmbus_channel_message_table_entry
gChannelMessageTable[ChannelMessageCount] = { gChannelMessageTable[ChannelMessageCount] = {
{ChannelMessageInvalid, NULL}, {ChannelMessageInvalid, NULL},
{ChannelMessageOfferChannel, VmbusChannelOnOffer}, {ChannelMessageOfferChannel, vmbus_onoffer},
{ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind}, {ChannelMessageRescindChannelOffer, vmbus_onoffer_rescind},
{ChannelMessageRequestOffers, NULL}, {ChannelMessageRequestOffers, NULL},
{ChannelMessageAllOffersDelivered, VmbusChannelOnOffersDelivered}, {ChannelMessageAllOffersDelivered, vmbus_onoffers_delivered},
{ChannelMessageOpenChannel, NULL}, {ChannelMessageOpenChannel, NULL},
{ChannelMessageOpenChannelResult, VmbusChannelOnOpenResult}, {ChannelMessageOpenChannelResult, vmbus_onopen_result},
{ChannelMessageCloseChannel, NULL}, {ChannelMessageCloseChannel, NULL},
{ChannelMessageGpadlHeader, NULL}, {ChannelMessageGpadlHeader, NULL},
{ChannelMessageGpadlBody, NULL}, {ChannelMessageGpadlBody, NULL},
{ChannelMessageGpadlCreated, VmbusChannelOnGpadlCreated}, {ChannelMessageGpadlCreated, vmbus_ongpadl_created},
{ChannelMessageGpadlTeardown, NULL}, {ChannelMessageGpadlTeardown, NULL},
{ChannelMessageGpadlTorndown, VmbusChannelOnGpadlTorndown}, {ChannelMessageGpadlTorndown, vmbus_ongpadl_torndown},
{ChannelMessageRelIdReleased, NULL}, {ChannelMessageRelIdReleased, NULL},
{ChannelMessageInitiateContact, NULL}, {ChannelMessageInitiateContact, NULL},
{ChannelMessageVersionResponse, VmbusChannelOnVersionResponse}, {ChannelMessageVersionResponse, vmbus_onversion_response},
{ChannelMessageUnload, NULL}, {ChannelMessageUnload, NULL},
}; };
/* /*
* VmbusOnChannelMessage - Handler for channel protocol messages. * vmbus_onmessage - Handler for channel protocol messages.
* *
* This is invoked in the vmbus worker thread context. * This is invoked in the vmbus worker thread context.
*/ */
void VmbusOnChannelMessage(void *context) void vmbus_onmessage(void *context)
{ {
struct hv_message *msg = context; struct hv_message *msg = context;
struct vmbus_channel_message_header *hdr; struct vmbus_channel_message_header *hdr;
...@@ -766,9 +768,9 @@ void VmbusOnChannelMessage(void *context) ...@@ -766,9 +768,9 @@ void VmbusOnChannelMessage(void *context)
} }
/* /*
* VmbusChannelRequestOffers - Send a request to get all our pending offers. * vmbus_request_offers - Send a request to get all our pending offers.
*/ */
int VmbusChannelRequestOffers(void) int vmbus_request_offers(void)
{ {
struct vmbus_channel_message_header *msg; struct vmbus_channel_message_header *msg;
struct vmbus_channel_msginfo *msginfo; struct vmbus_channel_msginfo *msginfo;
...@@ -823,10 +825,10 @@ int VmbusChannelRequestOffers(void) ...@@ -823,10 +825,10 @@ int VmbusChannelRequestOffers(void)
} }
/* /*
* VmbusChannelReleaseUnattachedChannels - Release channels that are * vmbus_release_unattached_channels - Release channels that are
* unattached/unconnected ie (no drivers associated) * unattached/unconnected ie (no drivers associated)
*/ */
void VmbusChannelReleaseUnattachedChannels(void) void vmbus_release_unattached_channels(void)
{ {
struct vmbus_channel *channel, *pos; struct vmbus_channel *channel, *pos;
struct vmbus_channel *start = NULL; struct vmbus_channel *start = NULL;
...@@ -846,7 +848,7 @@ void VmbusChannelReleaseUnattachedChannels(void) ...@@ -846,7 +848,7 @@ void VmbusChannelReleaseUnattachedChannels(void)
channel->DeviceObject); channel->DeviceObject);
VmbusChildDeviceRemove(channel->DeviceObject); VmbusChildDeviceRemove(channel->DeviceObject);
FreeVmbusChannel(channel); free_channel(channel);
} else { } else {
if (!start) if (!start)
start = channel; start = channel;
......
...@@ -307,14 +307,14 @@ struct vmbus_channel_msginfo { ...@@ -307,14 +307,14 @@ struct vmbus_channel_msginfo {
}; };
struct vmbus_channel *AllocVmbusChannel(void); struct vmbus_channel *alloc_channel(void);
void FreeVmbusChannel(struct vmbus_channel *Channel); void free_channel(struct vmbus_channel *channel);
void VmbusOnChannelMessage(void *Context); void vmbus_onmessage(void *context);
int VmbusChannelRequestOffers(void); int vmbus_request_offers(void);
void VmbusChannelReleaseUnattachedChannels(void); void vmbus_release_unattached_channels(void);
#endif /* _CHANNEL_MGMT_H_ */ #endif /* _CHANNEL_MGMT_H_ */
...@@ -57,7 +57,7 @@ static struct hv_device *gDevice; /* vmbus root device */ ...@@ -57,7 +57,7 @@ static struct hv_device *gDevice; /* vmbus root device */
*/ */
static void VmbusGetChannelOffers(void) static void VmbusGetChannelOffers(void)
{ {
VmbusChannelRequestOffers(); vmbus_request_offers();
} }
/* /*
...@@ -134,7 +134,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev) ...@@ -134,7 +134,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
{ {
int ret = 0; int ret = 0;
VmbusChannelReleaseUnattachedChannels(); vmbus_release_unattached_channels();
VmbusDisconnect(); VmbusDisconnect();
on_each_cpu(HvSynicCleanup, NULL, 1); on_each_cpu(HvSynicCleanup, NULL, 1);
return ret; return ret;
...@@ -171,7 +171,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv) ...@@ -171,7 +171,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
continue; continue;
osd_schedule_callback(gVmbusConnection.WorkQueue, osd_schedule_callback(gVmbusConnection.WorkQueue,
VmbusOnChannelMessage, vmbus_onmessage,
(void *)copied); (void *)copied);
} }
......
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