aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2010-10-15 13:14:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-15 15:45:30 -0400
commite98cb276819d4c4d6eeaf26ddf627ec8ec9d8f1e (patch)
tree81475d551b182ab8ba9f75e2ea98f1f386d9af43 /drivers/staging/hv
parent188963ec75aec892acdaec00c547602a9bcb3209 (diff)
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: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r--drivers/staging/hv/channel.c2
-rw-r--r--drivers/staging/hv/channel_mgmt.c90
-rw-r--r--drivers/staging/hv/channel_mgmt.h10
-rw-r--r--drivers/staging/hv/vmbus.c6
4 files changed, 55 insertions, 53 deletions
diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c
index 39b8fd3d045..45dda9b32e9 100644
--- a/drivers/staging/hv/channel.c
+++ b/drivers/staging/hv/channel.c
@@ -698,7 +698,7 @@ void vmbus_close(struct vmbus_channel *channel)
698 list_del(&channel->ListEntry); 698 list_del(&channel->ListEntry);
699 spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); 699 spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
700 700
701 FreeVmbusChannel(channel); 701 free_channel(channel);
702 } 702 }
703} 703}
704 704
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index 7522cfdf1eb..0d5dbf3908d 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -235,9 +235,9 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = {
235EXPORT_SYMBOL(hv_cb_utils); 235EXPORT_SYMBOL(hv_cb_utils);
236 236
237/* 237/*
238 * AllocVmbusChannel - Allocate and initialize a vmbus channel object 238 * alloc_channel - Allocate and initialize a vmbus channel object
239 */ 239 */
240struct vmbus_channel *AllocVmbusChannel(void) 240struct vmbus_channel *alloc_channel(void)
241{ 241{
242 struct vmbus_channel *channel; 242 struct vmbus_channel *channel;
243 243
@@ -261,9 +261,9 @@ struct vmbus_channel *AllocVmbusChannel(void)
261} 261}
262 262
263/* 263/*
264 * ReleaseVmbusChannel - Release the vmbus channel object itself 264 * release_hannel - Release the vmbus channel object itself
265 */ 265 */
266static inline void ReleaseVmbusChannel(void *context) 266static inline void release_channel(void *context)
267{ 267{
268 struct vmbus_channel *channel = context; 268 struct vmbus_channel *channel = context;
269 269
@@ -275,9 +275,9 @@ static inline void ReleaseVmbusChannel(void *context)
275} 275}
276 276
277/* 277/*
278 * FreeVmbusChannel - Release the resources used by the vmbus channel object 278 * free_channel - Release the resources used by the vmbus channel object
279 */ 279 */
280void FreeVmbusChannel(struct vmbus_channel *channel) 280void free_channel(struct vmbus_channel *channel)
281{ 281{
282 del_timer_sync(&channel->poll_timer); 282 del_timer_sync(&channel->poll_timer);
283 283
@@ -286,7 +286,7 @@ void FreeVmbusChannel(struct vmbus_channel *channel)
286 * workqueue/thread context 286 * workqueue/thread context
287 * ie we can't destroy ourselves. 287 * ie we can't destroy ourselves.
288 */ 288 */
289 osd_schedule_callback(gVmbusConnection.WorkQueue, ReleaseVmbusChannel, 289 osd_schedule_callback(gVmbusConnection.WorkQueue, release_channel,
290 channel); 290 channel);
291} 291}
292 292
@@ -310,10 +310,10 @@ static void count_hv_channel(void)
310 310
311 311
312/* 312/*
313 * VmbusChannelProcessOffer - Process the offer by creating a channel/device 313 * vmbus_process_offer - Process the offer by creating a channel/device
314 * associated with this offer 314 * associated with this offer
315 */ 315 */
316static void VmbusChannelProcessOffer(void *context) 316static void vmbus_process_offer(void *context)
317{ 317{
318 struct vmbus_channel *newchannel = context; 318 struct vmbus_channel *newchannel = context;
319 struct vmbus_channel *channel; 319 struct vmbus_channel *channel;
@@ -346,7 +346,7 @@ static void VmbusChannelProcessOffer(void *context)
346 if (!fnew) { 346 if (!fnew) {
347 DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)", 347 DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
348 newchannel->OfferMsg.ChildRelId); 348 newchannel->OfferMsg.ChildRelId);
349 FreeVmbusChannel(newchannel); 349 free_channel(newchannel);
350 return; 350 return;
351 } 351 }
352 352
@@ -378,7 +378,7 @@ static void VmbusChannelProcessOffer(void *context)
378 list_del(&newchannel->ListEntry); 378 list_del(&newchannel->ListEntry);
379 spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); 379 spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
380 380
381 FreeVmbusChannel(newchannel); 381 free_channel(newchannel);
382 } else { 382 } else {
383 /* 383 /*
384 * This state is used to indicate a successful open 384 * This state is used to indicate a successful open
@@ -406,9 +406,10 @@ static void VmbusChannelProcessOffer(void *context)
406} 406}
407 407
408/* 408/*
409 * VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal 409 * vmbus_process_rescind_offer -
410 * Rescind the offer by initiating a device removal
410 */ 411 */
411static void VmbusChannelProcessRescindOffer(void *context) 412static void vmbus_process_rescind_offer(void *context)
412{ 413{
413 struct vmbus_channel *channel = context; 414 struct vmbus_channel *channel = context;
414 415
@@ -416,13 +417,13 @@ static void VmbusChannelProcessRescindOffer(void *context)
416} 417}
417 418
418/* 419/*
419 * VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition. 420 * vmbus_onoffer - Handler for channel offers from vmbus in parent partition.
420 * 421 *
421 * We ignore all offers except network and storage offers. For each network and 422 * We ignore all offers except network and storage offers. For each network and
422 * storage offers, we create a channel object and queue a work item to the 423 * storage offers, we create a channel object and queue a work item to the
423 * channel object to process the offer synchronously 424 * channel object to process the offer synchronously
424 */ 425 */
425static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr) 426static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
426{ 427{
427 struct vmbus_channel_offer_channel *offer; 428 struct vmbus_channel_offer_channel *offer;
428 struct vmbus_channel *newchannel; 429 struct vmbus_channel *newchannel;
@@ -475,7 +476,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
475 guidinstance->data[14], guidinstance->data[15]); 476 guidinstance->data[14], guidinstance->data[15]);
476 477
477 /* Allocate the channel object and save this offer. */ 478 /* Allocate the channel object and save this offer. */
478 newchannel = AllocVmbusChannel(); 479 newchannel = alloc_channel();
479 if (!newchannel) { 480 if (!newchannel) {
480 DPRINT_ERR(VMBUS, "unable to allocate channel object"); 481 DPRINT_ERR(VMBUS, "unable to allocate channel object");
481 return; 482 return;
@@ -489,16 +490,16 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
489 newchannel->MonitorBit = (u8)offer->MonitorId % 32; 490 newchannel->MonitorBit = (u8)offer->MonitorId % 32;
490 491
491 /* TODO: Make sure the offer comes from our parent partition */ 492 /* TODO: Make sure the offer comes from our parent partition */
492 osd_schedule_callback(newchannel->ControlWQ, VmbusChannelProcessOffer, 493 osd_schedule_callback(newchannel->ControlWQ, vmbus_process_offer,
493 newchannel); 494 newchannel);
494} 495}
495 496
496/* 497/*
497 * VmbusChannelOnOfferRescind - Rescind offer handler. 498 * vmbus_onoffer_rescind - Rescind offer handler.
498 * 499 *
499 * We queue a work item to process this offer synchronously 500 * We queue a work item to process this offer synchronously
500 */ 501 */
501static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr) 502static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
502{ 503{
503 struct vmbus_channel_rescind_offer *rescind; 504 struct vmbus_channel_rescind_offer *rescind;
504 struct vmbus_channel *channel; 505 struct vmbus_channel *channel;
@@ -512,28 +513,29 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
512 } 513 }
513 514
514 osd_schedule_callback(channel->ControlWQ, 515 osd_schedule_callback(channel->ControlWQ,
515 VmbusChannelProcessRescindOffer, 516 vmbus_process_rescind_offer,
516 channel); 517 channel);
517} 518}
518 519
519/* 520/*
520 * VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered. 521 * vmbus_onoffers_delivered -
522 * This is invoked when all offers have been delivered.
521 * 523 *
522 * Nothing to do here. 524 * Nothing to do here.
523 */ 525 */
524static void VmbusChannelOnOffersDelivered( 526static void vmbus_onoffers_delivered(
525 struct vmbus_channel_message_header *hdr) 527 struct vmbus_channel_message_header *hdr)
526{ 528{
527} 529}
528 530
529/* 531/*
530 * VmbusChannelOnOpenResult - Open result handler. 532 * vmbus_onopen_result - Open result handler.
531 * 533 *
532 * This is invoked when we received a response to our channel open request. 534 * This is invoked when we received a response to our channel open request.
533 * Find the matching request, copy the response and signal the requesting 535 * Find the matching request, copy the response and signal the requesting
534 * thread. 536 * thread.
535 */ 537 */
536static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr) 538static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
537{ 539{
538 struct vmbus_channel_open_result *result; 540 struct vmbus_channel_open_result *result;
539 struct list_head *curr; 541 struct list_head *curr;
@@ -573,13 +575,13 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
573} 575}
574 576
575/* 577/*
576 * VmbusChannelOnGpadlCreated - GPADL created handler. 578 * vmbus_ongpadl_created - GPADL created handler.
577 * 579 *
578 * This is invoked when we received a response to our gpadl create request. 580 * This is invoked when we received a response to our gpadl create request.
579 * Find the matching request, copy the response and signal the requesting 581 * Find the matching request, copy the response and signal the requesting
580 * thread. 582 * thread.
581 */ 583 */
582static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr) 584static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
583{ 585{
584 struct vmbus_channel_gpadl_created *gpadlcreated; 586 struct vmbus_channel_gpadl_created *gpadlcreated;
585 struct list_head *curr; 587 struct list_head *curr;
@@ -623,13 +625,13 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
623} 625}
624 626
625/* 627/*
626 * VmbusChannelOnGpadlTorndown - GPADL torndown handler. 628 * vmbus_ongpadl_torndown - GPADL torndown handler.
627 * 629 *
628 * This is invoked when we received a response to our gpadl teardown request. 630 * This is invoked when we received a response to our gpadl teardown request.
629 * Find the matching request, copy the response and signal the requesting 631 * Find the matching request, copy the response and signal the requesting
630 * thread. 632 * thread.
631 */ 633 */
632static void VmbusChannelOnGpadlTorndown( 634static void vmbus_ongpadl_torndown(
633 struct vmbus_channel_message_header *hdr) 635 struct vmbus_channel_message_header *hdr)
634{ 636{
635 struct vmbus_channel_gpadl_torndown *gpadl_torndown; 637 struct vmbus_channel_gpadl_torndown *gpadl_torndown;
@@ -669,13 +671,13 @@ static void VmbusChannelOnGpadlTorndown(
669} 671}
670 672
671/* 673/*
672 * VmbusChannelOnVersionResponse - Version response handler 674 * vmbus_onversion_response - Version response handler
673 * 675 *
674 * This is invoked when we received a response to our initiate contact request. 676 * This is invoked when we received a response to our initiate contact request.
675 * Find the matching request, copy the response and signal the requesting 677 * Find the matching request, copy the response and signal the requesting
676 * thread. 678 * thread.
677 */ 679 */
678static void VmbusChannelOnVersionResponse( 680static void vmbus_onversion_response(
679 struct vmbus_channel_message_header *hdr) 681 struct vmbus_channel_message_header *hdr)
680{ 682{
681 struct list_head *curr; 683 struct list_head *curr;
@@ -711,30 +713,30 @@ static void VmbusChannelOnVersionResponse(
711static struct vmbus_channel_message_table_entry 713static struct vmbus_channel_message_table_entry
712 gChannelMessageTable[ChannelMessageCount] = { 714 gChannelMessageTable[ChannelMessageCount] = {
713 {ChannelMessageInvalid, NULL}, 715 {ChannelMessageInvalid, NULL},
714 {ChannelMessageOfferChannel, VmbusChannelOnOffer}, 716 {ChannelMessageOfferChannel, vmbus_onoffer},
715 {ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind}, 717 {ChannelMessageRescindChannelOffer, vmbus_onoffer_rescind},
716 {ChannelMessageRequestOffers, NULL}, 718 {ChannelMessageRequestOffers, NULL},
717 {ChannelMessageAllOffersDelivered, VmbusChannelOnOffersDelivered}, 719 {ChannelMessageAllOffersDelivered, vmbus_onoffers_delivered},
718 {ChannelMessageOpenChannel, NULL}, 720 {ChannelMessageOpenChannel, NULL},
719 {ChannelMessageOpenChannelResult, VmbusChannelOnOpenResult}, 721 {ChannelMessageOpenChannelResult, vmbus_onopen_result},
720 {ChannelMessageCloseChannel, NULL}, 722 {ChannelMessageCloseChannel, NULL},
721 {ChannelMessageGpadlHeader, NULL}, 723 {ChannelMessageGpadlHeader, NULL},
722 {ChannelMessageGpadlBody, NULL}, 724 {ChannelMessageGpadlBody, NULL},
723 {ChannelMessageGpadlCreated, VmbusChannelOnGpadlCreated}, 725 {ChannelMessageGpadlCreated, vmbus_ongpadl_created},
724 {ChannelMessageGpadlTeardown, NULL}, 726 {ChannelMessageGpadlTeardown, NULL},
725 {ChannelMessageGpadlTorndown, VmbusChannelOnGpadlTorndown}, 727 {ChannelMessageGpadlTorndown, vmbus_ongpadl_torndown},
726 {ChannelMessageRelIdReleased, NULL}, 728 {ChannelMessageRelIdReleased, NULL},
727 {ChannelMessageInitiateContact, NULL}, 729 {ChannelMessageInitiateContact, NULL},
728 {ChannelMessageVersionResponse, VmbusChannelOnVersionResponse}, 730 {ChannelMessageVersionResponse, vmbus_onversion_response},
729 {ChannelMessageUnload, NULL}, 731 {ChannelMessageUnload, NULL},
730}; 732};
731 733
732/* 734/*
733 * VmbusOnChannelMessage - Handler for channel protocol messages. 735 * vmbus_onmessage - Handler for channel protocol messages.
734 * 736 *
735 * This is invoked in the vmbus worker thread context. 737 * This is invoked in the vmbus worker thread context.
736 */ 738 */
737void VmbusOnChannelMessage(void *context) 739void vmbus_onmessage(void *context)
738{ 740{
739 struct hv_message *msg = context; 741 struct hv_message *msg = context;
740 struct vmbus_channel_message_header *hdr; 742 struct vmbus_channel_message_header *hdr;
@@ -766,9 +768,9 @@ void VmbusOnChannelMessage(void *context)
766} 768}
767 769
768/* 770/*
769 * VmbusChannelRequestOffers - Send a request to get all our pending offers. 771 * vmbus_request_offers - Send a request to get all our pending offers.
770 */ 772 */
771int VmbusChannelRequestOffers(void) 773int vmbus_request_offers(void)
772{ 774{
773 struct vmbus_channel_message_header *msg; 775 struct vmbus_channel_message_header *msg;
774 struct vmbus_channel_msginfo *msginfo; 776 struct vmbus_channel_msginfo *msginfo;
@@ -823,10 +825,10 @@ Cleanup:
823} 825}
824 826
825/* 827/*
826 * VmbusChannelReleaseUnattachedChannels - Release channels that are 828 * vmbus_release_unattached_channels - Release channels that are
827 * unattached/unconnected ie (no drivers associated) 829 * unattached/unconnected ie (no drivers associated)
828 */ 830 */
829void VmbusChannelReleaseUnattachedChannels(void) 831void vmbus_release_unattached_channels(void)
830{ 832{
831 struct vmbus_channel *channel, *pos; 833 struct vmbus_channel *channel, *pos;
832 struct vmbus_channel *start = NULL; 834 struct vmbus_channel *start = NULL;
@@ -846,7 +848,7 @@ void VmbusChannelReleaseUnattachedChannels(void)
846 channel->DeviceObject); 848 channel->DeviceObject);
847 849
848 VmbusChildDeviceRemove(channel->DeviceObject); 850 VmbusChildDeviceRemove(channel->DeviceObject);
849 FreeVmbusChannel(channel); 851 free_channel(channel);
850 } else { 852 } else {
851 if (!start) 853 if (!start)
852 start = channel; 854 start = channel;
diff --git a/drivers/staging/hv/channel_mgmt.h b/drivers/staging/hv/channel_mgmt.h
index f969267895b..b0ed31f75eb 100644
--- a/drivers/staging/hv/channel_mgmt.h
+++ b/drivers/staging/hv/channel_mgmt.h
@@ -307,14 +307,14 @@ struct vmbus_channel_msginfo {
307}; 307};
308 308
309 309
310struct vmbus_channel *AllocVmbusChannel(void); 310struct vmbus_channel *alloc_channel(void);
311 311
312void FreeVmbusChannel(struct vmbus_channel *Channel); 312void free_channel(struct vmbus_channel *channel);
313 313
314void VmbusOnChannelMessage(void *Context); 314void vmbus_onmessage(void *context);
315 315
316int VmbusChannelRequestOffers(void); 316int vmbus_request_offers(void);
317 317
318void VmbusChannelReleaseUnattachedChannels(void); 318void vmbus_release_unattached_channels(void);
319 319
320#endif /* _CHANNEL_MGMT_H_ */ 320#endif /* _CHANNEL_MGMT_H_ */
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c
index 0f2e1be7eb3..b385e6f6346 100644
--- a/drivers/staging/hv/vmbus.c
+++ b/drivers/staging/hv/vmbus.c
@@ -57,7 +57,7 @@ static struct hv_device *gDevice; /* vmbus root device */
57 */ 57 */
58static void VmbusGetChannelOffers(void) 58static void VmbusGetChannelOffers(void)
59{ 59{
60 VmbusChannelRequestOffers(); 60 vmbus_request_offers();
61} 61}
62 62
63/* 63/*
@@ -134,7 +134,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
134{ 134{
135 int ret = 0; 135 int ret = 0;
136 136
137 VmbusChannelReleaseUnattachedChannels(); 137 vmbus_release_unattached_channels();
138 VmbusDisconnect(); 138 VmbusDisconnect();
139 on_each_cpu(HvSynicCleanup, NULL, 1); 139 on_each_cpu(HvSynicCleanup, NULL, 1);
140 return ret; 140 return ret;
@@ -171,7 +171,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
171 continue; 171 continue;
172 172
173 osd_schedule_callback(gVmbusConnection.WorkQueue, 173 osd_schedule_callback(gVmbusConnection.WorkQueue,
174 VmbusOnChannelMessage, 174 vmbus_onmessage,
175 (void *)copied); 175 (void *)copied);
176 } 176 }
177 177