Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: hv: Convert camel case function names in storvsc.c to lowercase

Convert camel case function names in storvsc.c to lowercase

Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
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>

authored by

Hank Janssen and committed by
Greg Kroah-Hartman
02e37db7 3d8cdf22

+51 -48
+4 -4
drivers/staging/hv/blkvsc.c
··· 42 42 43 43 deviceInfo = (struct storvsc_device_info *)AdditionalInfo; 44 44 45 - ret = StorVscOnDeviceAdd(Device, AdditionalInfo); 45 + ret = stor_vsc_on_device_add(Device, AdditionalInfo); 46 46 if (ret != 0) 47 47 return ret; 48 48 ··· 94 94 95 95 /* Setup the dispatch table */ 96 96 storDriver->base.OnDeviceAdd = BlkVscOnDeviceAdd; 97 - storDriver->base.OnDeviceRemove = StorVscOnDeviceRemove; 98 - storDriver->base.OnCleanup = StorVscOnCleanup; 99 - storDriver->on_io_request = StorVscOnIORequest; 97 + storDriver->base.OnDeviceRemove = stor_vsc_on_device_remove; 98 + storDriver->base.OnCleanup = stor_vsc_on_cleanup; 99 + storDriver->on_io_request = stor_vsc_on_io_request; 100 100 101 101 return ret; 102 102 }
+47 -44
drivers/staging/hv/storvsc.c
··· 81 81 }; 82 82 83 83 84 - static inline struct storvsc_device *AllocStorDevice(struct hv_device *Device) 84 + static inline struct storvsc_device *alloc_stor_device(struct hv_device *Device) 85 85 { 86 86 struct storvsc_device *storDevice; 87 87 ··· 99 99 return storDevice; 100 100 } 101 101 102 - static inline void FreeStorDevice(struct storvsc_device *Device) 102 + static inline void free_stor_device(struct storvsc_device *Device) 103 103 { 104 104 /* ASSERT(atomic_read(&Device->ref_count) == 0); */ 105 105 kfree(Device); 106 106 } 107 107 108 108 /* Get the stordevice object iff exists and its refcount > 1 */ 109 - static inline struct storvsc_device *GetStorDevice(struct hv_device *Device) 109 + static inline struct storvsc_device *get_stor_device(struct hv_device *Device) 110 110 { 111 111 struct storvsc_device *storDevice; 112 112 ··· 120 120 } 121 121 122 122 /* Get the stordevice object iff exists and its refcount > 0 */ 123 - static inline struct storvsc_device *MustGetStorDevice(struct hv_device *Device) 123 + static inline struct storvsc_device *must_get_stor_device( 124 + struct hv_device *Device) 124 125 { 125 126 struct storvsc_device *storDevice; 126 127 ··· 134 133 return storDevice; 135 134 } 136 135 137 - static inline void PutStorDevice(struct hv_device *Device) 136 + static inline void put_stor_device(struct hv_device *Device) 138 137 { 139 138 struct storvsc_device *storDevice; 140 139 ··· 145 144 /* ASSERT(atomic_read(&storDevice->ref_count)); */ 146 145 } 147 146 148 - /* Drop ref count to 1 to effectively disable GetStorDevice() */ 149 - static inline struct storvsc_device *ReleaseStorDevice(struct hv_device *Device) 147 + /* Drop ref count to 1 to effectively disable get_stor_device() */ 148 + static inline struct storvsc_device *release_stor_device( 149 + struct hv_device *Device) 150 150 { 151 151 struct storvsc_device *storDevice; 152 152 ··· 162 160 } 163 161 164 162 /* Drop ref count to 0. No one can use StorDevice object. */ 165 - static inline struct storvsc_device *FinalReleaseStorDevice( 163 + static inline struct storvsc_device *final_release_stor_device( 166 164 struct hv_device *Device) 167 165 { 168 166 struct storvsc_device *storDevice; ··· 178 176 return storDevice; 179 177 } 180 178 181 - static int StorVscChannelInit(struct hv_device *Device) 179 + static int stor_vsc_channel_init(struct hv_device *Device) 182 180 { 183 181 struct storvsc_device *storDevice; 184 182 struct storvsc_request_extension *request; 185 183 struct vstor_packet *vstorPacket; 186 184 int ret; 187 185 188 - storDevice = GetStorDevice(Device); 186 + storDevice = get_stor_device(Device); 189 187 if (!storDevice) { 190 188 DPRINT_ERR(STORVSC, "unable to get stor device..." 191 189 "device being destroyed?"); ··· 342 340 kfree(request->wait_event); 343 341 request->wait_event = NULL; 344 342 nomem: 345 - PutStorDevice(Device); 343 + put_stor_device(Device); 346 344 return ret; 347 345 } 348 346 349 - static void StorVscOnIOCompletion(struct hv_device *Device, 347 + static void stor_vsc_on_io_completion(struct hv_device *Device, 350 348 struct vstor_packet *VStorPacket, 351 349 struct storvsc_request_extension *RequestExt) 352 350 { 353 351 struct hv_storvsc_request *request; 354 352 struct storvsc_device *storDevice; 355 353 356 - storDevice = MustGetStorDevice(Device); 354 + storDevice = must_get_stor_device(Device); 357 355 if (!storDevice) { 358 356 DPRINT_ERR(STORVSC, "unable to get stor device..." 359 357 "device being destroyed?"); ··· 407 405 408 406 atomic_dec(&storDevice->num_outstanding_requests); 409 407 410 - PutStorDevice(Device); 408 + put_stor_device(Device); 411 409 } 412 410 413 - static void StorVscOnReceive(struct hv_device *Device, 411 + static void stor_vsc_on_receive(struct hv_device *Device, 414 412 struct vstor_packet *VStorPacket, 415 413 struct storvsc_request_extension *RequestExt) 416 414 { 417 415 switch (VStorPacket->operation) { 418 416 case VSTOR_OPERATION_COMPLETE_IO: 419 417 DPRINT_DBG(STORVSC, "IO_COMPLETE_OPERATION"); 420 - StorVscOnIOCompletion(Device, VStorPacket, RequestExt); 418 + stor_vsc_on_io_completion(Device, VStorPacket, RequestExt); 421 419 break; 422 420 case VSTOR_OPERATION_REMOVE_DEVICE: 423 421 DPRINT_INFO(STORVSC, "REMOVE_DEVICE_OPERATION"); ··· 431 429 } 432 430 } 433 431 434 - static void StorVscOnChannelCallback(void *context) 432 + static void stor_vsc_on_channel_callback(void *context) 435 433 { 436 434 struct hv_device *device = (struct hv_device *)context; 437 435 struct storvsc_device *storDevice; ··· 443 441 444 442 /* ASSERT(device); */ 445 443 446 - storDevice = MustGetStorDevice(device); 444 + storDevice = must_get_stor_device(device); 447 445 if (!storDevice) { 448 446 DPRINT_ERR(STORVSC, "unable to get stor device..." 449 447 "device being destroyed?"); ··· 478 476 479 477 osd_waitevent_set(request->wait_event); 480 478 } else { 481 - StorVscOnReceive(device, 479 + stor_vsc_on_receive(device, 482 480 (struct vstor_packet *)packet, 483 481 request); 484 482 } ··· 488 486 } 489 487 } while (1); 490 488 491 - PutStorDevice(device); 489 + put_stor_device(device); 492 490 return; 493 491 } 494 492 495 - static int StorVscConnectToVsp(struct hv_device *Device) 493 + static int stor_vsc_connect_to_vsp(struct hv_device *Device) 496 494 { 497 495 struct vmstorage_channel_properties props; 498 496 struct storvsc_driver_object *storDriver; ··· 507 505 storDriver->ring_buffer_size, 508 506 (void *)&props, 509 507 sizeof(struct vmstorage_channel_properties), 510 - StorVscOnChannelCallback, Device); 508 + stor_vsc_on_channel_callback, Device); 511 509 512 510 DPRINT_DBG(STORVSC, "storage props: path id %d, tgt id %d, max xfer %d", 513 511 props.path_id, props.target_id, props.max_transfer_bytes); ··· 517 515 return -1; 518 516 } 519 517 520 - ret = StorVscChannelInit(Device); 518 + ret = stor_vsc_channel_init(Device); 521 519 522 520 return ret; 523 521 } 524 522 525 523 /* 526 - * StorVscOnDeviceAdd - Callback when the device belonging to this driver is added 524 + * stor_vsc_on_device_add - Callback when the device belonging to this driver 527 525 * is added 528 526 */ 529 - static int StorVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) 527 + static int stor_vsc_on_device_add(struct hv_device *Device, 528 + void *AdditionalInfo) 530 529 { 531 530 struct storvsc_device *storDevice; 532 531 /* struct vmstorage_channel_properties *props; */ ··· 535 532 int ret = 0; 536 533 537 534 deviceInfo = (struct storvsc_device_info *)AdditionalInfo; 538 - storDevice = AllocStorDevice(Device); 535 + storDevice = alloc_stor_device(Device); 539 536 if (!storDevice) { 540 537 ret = -1; 541 538 goto Cleanup; ··· 558 555 559 556 storDevice->port_number = deviceInfo->port_number; 560 557 /* Send it back up */ 561 - ret = StorVscConnectToVsp(Device); 558 + ret = stor_vsc_connect_to_vsp(Device); 562 559 563 560 /* deviceInfo->PortNumber = storDevice->PortNumber; */ 564 561 deviceInfo->path_id = storDevice->path_id; ··· 573 570 } 574 571 575 572 /* 576 - * StorVscOnDeviceRemove - Callback when the our device is being removed 573 + * stor_vsc_on_device_remove - Callback when the our device is being removed 577 574 */ 578 - static int StorVscOnDeviceRemove(struct hv_device *Device) 575 + static int stor_vsc_on_device_remove(struct hv_device *Device) 579 576 { 580 577 struct storvsc_device *storDevice; 581 578 582 579 DPRINT_INFO(STORVSC, "disabling storage device (%p)...", 583 580 Device->Extension); 584 581 585 - storDevice = ReleaseStorDevice(Device); 582 + storDevice = release_stor_device(Device); 586 583 587 584 /* 588 585 * At this point, all outbound traffic should be disable. We ··· 598 595 DPRINT_INFO(STORVSC, "removing storage device (%p)...", 599 596 Device->Extension); 600 597 601 - storDevice = FinalReleaseStorDevice(Device); 598 + storDevice = final_release_stor_device(Device); 602 599 603 600 DPRINT_INFO(STORVSC, "storage device (%p) safe to remove", storDevice); 604 601 605 602 /* Close the channel */ 606 603 vmbus_close(Device->channel); 607 604 608 - FreeStorDevice(storDevice); 605 + free_stor_device(storDevice); 609 606 return 0; 610 607 } 611 608 ··· 618 615 619 616 DPRINT_INFO(STORVSC, "resetting host adapter..."); 620 617 621 - storDevice = GetStorDevice(Device); 618 + storDevice = get_stor_device(Device); 622 619 if (!storDevice) { 623 620 DPRINT_ERR(STORVSC, "unable to get stor device..." 624 621 "device being destroyed?"); ··· 661 658 */ 662 659 663 660 Cleanup: 664 - PutStorDevice(Device); 661 + put_stor_device(Device); 665 662 return ret; 666 663 } 667 664 668 665 /* 669 - * StorVscOnIORequest - Callback to initiate an I/O request 666 + * stor_vsc_on_io_request - Callback to initiate an I/O request 670 667 */ 671 - static int StorVscOnIORequest(struct hv_device *Device, 668 + static int stor_vsc_on_io_request(struct hv_device *Device, 672 669 struct hv_storvsc_request *Request) 673 670 { 674 671 struct storvsc_device *storDevice; ··· 679 676 requestExtension = 680 677 (struct storvsc_request_extension *)Request->extension; 681 678 vstorPacket = &requestExtension->vstor_packet; 682 - storDevice = GetStorDevice(Device); 679 + storDevice = get_stor_device(Device); 683 680 684 681 DPRINT_DBG(STORVSC, "enter - Device %p, DeviceExt %p, Request %p, " 685 682 "Extension %p", Device, storDevice, Request, ··· 754 751 755 752 atomic_inc(&storDevice->num_outstanding_requests); 756 753 757 - PutStorDevice(Device); 754 + put_stor_device(Device); 758 755 return ret; 759 756 } 760 757 761 758 /* 762 - * StorVscOnCleanup - Perform any cleanup when the driver is removed 759 + * stor_vsc_on_cleanup - Perform any cleanup when the driver is removed 763 760 */ 764 - static void StorVscOnCleanup(struct hv_driver *Driver) 761 + static void stor_vsc_on_cleanup(struct hv_driver *Driver) 765 762 { 766 763 } 767 764 ··· 809 806 STORVSC_MAX_IO_REQUESTS); 810 807 811 808 /* Setup the dispatch table */ 812 - storDriver->base.OnDeviceAdd = StorVscOnDeviceAdd; 813 - storDriver->base.OnDeviceRemove = StorVscOnDeviceRemove; 814 - storDriver->base.OnCleanup = StorVscOnCleanup; 809 + storDriver->base.OnDeviceAdd = stor_vsc_on_device_add; 810 + storDriver->base.OnDeviceRemove = stor_vsc_on_device_remove; 811 + storDriver->base.OnCleanup = stor_vsc_on_cleanup; 815 812 816 - storDriver->on_io_request = StorVscOnIORequest; 813 + storDriver->on_io_request = stor_vsc_on_io_request; 817 814 818 815 return 0; 819 816 }