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

virt: vbox: core: fix all kernel-doc warnings

Use kernel-doc format for functions that have comments that begin
with "/**".
This prevents 26 kernel-doc warnings.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20231222052521.14333-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Randy Dunlap and committed by
Greg Kroah-Hartman
8974a86d 7037f714

+92 -64
+92 -64
drivers/virt/vboxguest/vboxguest_core.c
··· 33 33 VMMDEV_REQUESTOR_CON_DONT_KNOW | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN) 34 34 35 35 /** 36 - * Reserves memory in which the VMM can relocate any guest mappings 37 - * that are floating around. 36 + * vbg_guest_mappings_init - Reserves memory in which the VMM can 37 + * relocate any guest mappings that are floating around. 38 + * @gdev: The Guest extension device. 38 39 * 39 40 * This operation is a little bit tricky since the VMM might not accept 40 41 * just any address because of address clashes between the three contexts 41 42 * it operates in, so we try several times. 42 43 * 43 44 * Failure to reserve the guest mappings is ignored. 44 - * 45 - * @gdev: The Guest extension device. 46 45 */ 47 46 static void vbg_guest_mappings_init(struct vbg_dev *gdev) 48 47 { ··· 124 125 } 125 126 126 127 /** 127 - * Undo what vbg_guest_mappings_init did. 128 + * vbg_guest_mappings_exit - Undo what vbg_guest_mappings_init did. 128 129 * 129 130 * @gdev: The Guest extension device. 130 131 */ ··· 165 166 } 166 167 167 168 /** 168 - * Report the guest information to the host. 169 - * Return: 0 or negative errno value. 169 + * vbg_report_guest_info - Report the guest information to the host. 170 170 * @gdev: The Guest extension device. 171 + * 172 + * Return: %0 or negative errno value. 171 173 */ 172 174 static int vbg_report_guest_info(struct vbg_dev *gdev) 173 175 { ··· 229 229 } 230 230 231 231 /** 232 - * Report the guest driver status to the host. 233 - * Return: 0 or negative errno value. 232 + * vbg_report_driver_status - Report the guest driver status to the host. 234 233 * @gdev: The Guest extension device. 235 234 * @active: Flag whether the driver is now active or not. 235 + * 236 + * Return: 0 or negative errno value. 236 237 */ 237 238 static int vbg_report_driver_status(struct vbg_dev *gdev, bool active) 238 239 { ··· 262 261 } 263 262 264 263 /** 265 - * Inflate the balloon by one chunk. The caller owns the balloon mutex. 266 - * Return: 0 or negative errno value. 264 + * vbg_balloon_inflate - Inflate the balloon by one chunk. The caller 265 + * owns the balloon mutex. 267 266 * @gdev: The Guest extension device. 268 267 * @chunk_idx: Index of the chunk. 268 + * 269 + * Return: %0 or negative errno value. 269 270 */ 270 271 static int vbg_balloon_inflate(struct vbg_dev *gdev, u32 chunk_idx) 271 272 { ··· 315 312 } 316 313 317 314 /** 318 - * Deflate the balloon by one chunk. The caller owns the balloon mutex. 319 - * Return: 0 or negative errno value. 315 + * vbg_balloon_deflate - Deflate the balloon by one chunk. The caller 316 + * owns the balloon mutex. 320 317 * @gdev: The Guest extension device. 321 318 * @chunk_idx: Index of the chunk. 319 + * 320 + * Return: %0 or negative errno value. 322 321 */ 323 322 static int vbg_balloon_deflate(struct vbg_dev *gdev, u32 chunk_idx) 324 323 { ··· 349 344 return 0; 350 345 } 351 346 352 - /** 347 + /* 353 348 * Respond to VMMDEV_EVENT_BALLOON_CHANGE_REQUEST events, query the size 354 349 * the host wants the balloon to be and adjust accordingly. 355 350 */ ··· 414 409 } 415 410 } 416 411 417 - /** 412 + /* 418 413 * Callback for heartbeat timer. 419 414 */ 420 415 static void vbg_heartbeat_timer(struct timer_list *t) ··· 427 422 } 428 423 429 424 /** 430 - * Configure the host to check guest's heartbeat 431 - * and get heartbeat interval from the host. 432 - * Return: 0 or negative errno value. 425 + * vbg_heartbeat_host_config - Configure the host to check guest's heartbeat 426 + * and get heartbeat interval from the host. 433 427 * @gdev: The Guest extension device. 434 428 * @enabled: Set true to enable guest heartbeat checks on host. 429 + * 430 + * Return: %0 or negative errno value. 435 431 */ 436 432 static int vbg_heartbeat_host_config(struct vbg_dev *gdev, bool enabled) 437 433 { ··· 455 449 } 456 450 457 451 /** 458 - * Initializes the heartbeat timer. This feature may be disabled by the host. 459 - * Return: 0 or negative errno value. 452 + * vbg_heartbeat_init - Initializes the heartbeat timer. This feature 453 + * may be disabled by the host. 460 454 * @gdev: The Guest extension device. 455 + * 456 + * Return: %0 or negative errno value. 461 457 */ 462 458 static int vbg_heartbeat_init(struct vbg_dev *gdev) 463 459 { ··· 489 481 } 490 482 491 483 /** 492 - * Cleanup hearbeat code, stop HB timer and disable host heartbeat checking. 484 + * vbg_heartbeat_exit - Cleanup heartbeat code, stop HB timer and disable 485 + * host heartbeat checking. 493 486 * @gdev: The Guest extension device. 494 487 */ 495 488 static void vbg_heartbeat_exit(struct vbg_dev *gdev) ··· 502 493 } 503 494 504 495 /** 505 - * Applies a change to the bit usage tracker. 506 - * Return: true if the mask changed, false if not. 496 + * vbg_track_bit_usage - Applies a change to the bit usage tracker. 507 497 * @tracker: The bit usage tracker. 508 498 * @changed: The bits to change. 509 499 * @previous: The previous value of the bits. 500 + * 501 + * Return: %true if the mask changed, %false if not. 510 502 */ 511 503 static bool vbg_track_bit_usage(struct vbg_bit_usage_tracker *tracker, 512 504 u32 changed, u32 previous) ··· 539 529 } 540 530 541 531 /** 542 - * Init and termination worker for resetting the (host) event filter on the host 543 - * Return: 0 or negative errno value. 532 + * vbg_reset_host_event_filter - Init and termination worker for 533 + * resetting the (host) event filter on the host 544 534 * @gdev: The Guest extension device. 545 535 * @fixed_events: Fixed events (init time). 536 + * 537 + * Return: %0 or negative errno value. 546 538 */ 547 539 static int vbg_reset_host_event_filter(struct vbg_dev *gdev, 548 540 u32 fixed_events) ··· 568 556 } 569 557 570 558 /** 571 - * Changes the event filter mask for the given session. 572 - * 573 - * This is called in response to VBG_IOCTL_CHANGE_FILTER_MASK as well as to 574 - * do session cleanup. Takes the session mutex. 575 - * 576 - * Return: 0 or negative errno value. 559 + * vbg_set_session_event_filter - Changes the event filter mask for the 560 + * given session. 577 561 * @gdev: The Guest extension device. 578 562 * @session: The session. 579 563 * @or_mask: The events to add. ··· 578 570 * This tweaks the error handling so we perform 579 571 * proper session cleanup even if the host 580 572 * misbehaves. 573 + * 574 + * This is called in response to VBG_IOCTL_CHANGE_FILTER_MASK as well as to 575 + * do session cleanup. Takes the session mutex. 576 + * 577 + * Return: 0 or negative errno value. 581 578 */ 582 579 static int vbg_set_session_event_filter(struct vbg_dev *gdev, 583 580 struct vbg_session *session, ··· 650 637 } 651 638 652 639 /** 653 - * Init and termination worker for set guest capabilities to zero on the host. 654 - * Return: 0 or negative errno value. 640 + * vbg_reset_host_capabilities - Init and termination worker for set 641 + * guest capabilities to zero on the host. 655 642 * @gdev: The Guest extension device. 643 + * 644 + * Return: %0 or negative errno value. 656 645 */ 657 646 static int vbg_reset_host_capabilities(struct vbg_dev *gdev) 658 647 { ··· 677 662 } 678 663 679 664 /** 680 - * Set guest capabilities on the host. 681 - * Must be called with gdev->session_mutex hold. 682 - * Return: 0 or negative errno value. 665 + * vbg_set_host_capabilities - Set guest capabilities on the host. 683 666 * @gdev: The Guest extension device. 684 667 * @session: The session. 685 668 * @session_termination: Set if we're called by the session cleanup code. 669 + * 670 + * Must be called with gdev->session_mutex hold. 671 + * 672 + * Return: %0 or negative errno value. 686 673 */ 687 674 static int vbg_set_host_capabilities(struct vbg_dev *gdev, 688 675 struct vbg_session *session, ··· 721 704 } 722 705 723 706 /** 724 - * Acquire (get exclusive access) guest capabilities for a session. 725 - * Takes the session mutex. 726 - * Return: 0 or negative errno value. 707 + * vbg_acquire_session_capabilities - Acquire (get exclusive access) 708 + * guest capabilities for a session. 727 709 * @gdev: The Guest extension device. 728 710 * @session: The session. 729 711 * @flags: Flags (VBGL_IOC_AGC_FLAGS_XXX). ··· 732 716 * This tweaks the error handling so we perform 733 717 * proper session cleanup even if the host 734 718 * misbehaves. 719 + * 720 + * Takes the session mutex. 721 + * 722 + * Return: %0 or negative errno value. 735 723 */ 736 724 static int vbg_acquire_session_capabilities(struct vbg_dev *gdev, 737 725 struct vbg_session *session, ··· 831 811 } 832 812 833 813 /** 834 - * Sets the guest capabilities for a session. Takes the session mutex. 835 - * Return: 0 or negative errno value. 814 + * vbg_set_session_capabilities - Sets the guest capabilities for a 815 + * session. Takes the session mutex. 836 816 * @gdev: The Guest extension device. 837 817 * @session: The session. 838 818 * @or_mask: The capabilities to add. ··· 841 821 * This tweaks the error handling so we perform 842 822 * proper session cleanup even if the host 843 823 * misbehaves. 824 + * 825 + * Return: %0 or negative errno value. 844 826 */ 845 827 static int vbg_set_session_capabilities(struct vbg_dev *gdev, 846 828 struct vbg_session *session, ··· 888 866 } 889 867 890 868 /** 891 - * vbg_query_host_version get the host feature mask and version information. 892 - * Return: 0 or negative errno value. 869 + * vbg_query_host_version - get the host feature mask and version information. 893 870 * @gdev: The Guest extension device. 871 + * 872 + * Return: %0 or negative errno value. 894 873 */ 895 874 static int vbg_query_host_version(struct vbg_dev *gdev) 896 875 { ··· 928 905 } 929 906 930 907 /** 931 - * Initializes the VBoxGuest device extension when the 932 - * device driver is loaded. 908 + * vbg_core_init - Initializes the VBoxGuest device extension when the 909 + * device driver is loaded. 910 + * @gdev: The Guest extension device. 911 + * @fixed_events: Events that will be enabled upon init and no client 912 + * will ever be allowed to mask. 933 913 * 934 914 * The native code locates the VMMDev on the PCI bus and retrieve 935 915 * the MMIO and I/O port ranges, this function will take care of 936 916 * mapping the MMIO memory (if present). Upon successful return 937 917 * the native code should set up the interrupt handler. 938 918 * 939 - * Return: 0 or negative errno value. 940 - * 941 - * @gdev: The Guest extension device. 942 - * @fixed_events: Events that will be enabled upon init and no client 943 - * will ever be allowed to mask. 919 + * Return: %0 or negative errno value. 944 920 */ 945 921 int vbg_core_init(struct vbg_dev *gdev, u32 fixed_events) 946 922 { ··· 1039 1017 } 1040 1018 1041 1019 /** 1042 - * Call this on exit to clean-up vboxguest-core managed resources. 1020 + * vbg_core_exit - Call this on exit to clean-up vboxguest-core managed 1021 + * resources. 1022 + * @gdev: The Guest extension device. 1043 1023 * 1044 1024 * The native code should call this before the driver is loaded, 1045 1025 * but don't call this on shutdown. 1046 - * @gdev: The Guest extension device. 1047 1026 */ 1048 1027 void vbg_core_exit(struct vbg_dev *gdev) 1049 1028 { ··· 1069 1046 } 1070 1047 1071 1048 /** 1072 - * Creates a VBoxGuest user session. 1073 - * 1074 - * vboxguest_linux.c calls this when userspace opens the char-device. 1075 - * Return: A pointer to the new session or an ERR_PTR on error. 1049 + * vbg_core_open_session - Creates a VBoxGuest user session. 1076 1050 * @gdev: The Guest extension device. 1077 1051 * @requestor: VMMDEV_REQUESTOR_* flags 1052 + * 1053 + * vboxguest_linux.c calls this when userspace opens the char-device. 1054 + * 1055 + * Return: A pointer to the new session or an ERR_PTR on error. 1078 1056 */ 1079 1057 struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, u32 requestor) 1080 1058 { ··· 1092 1068 } 1093 1069 1094 1070 /** 1095 - * Closes a VBoxGuest session. 1071 + * vbg_core_close_session - Closes a VBoxGuest session. 1096 1072 * @session: The session to close (and free). 1097 1073 */ 1098 1074 void vbg_core_close_session(struct vbg_session *session) ··· 1274 1250 } 1275 1251 1276 1252 /** 1277 - * Checks if the VMM request is allowed in the context of the given session. 1278 - * Return: 0 or negative errno value. 1253 + * vbg_req_allowed - Checks if the VMM request is allowed in the 1254 + * context of the given session. 1279 1255 * @gdev: The Guest extension device. 1280 1256 * @session: The calling session. 1281 1257 * @req: The request. 1258 + * 1259 + * Return: %0 or negative errno value. 1282 1260 */ 1283 1261 static int vbg_req_allowed(struct vbg_dev *gdev, struct vbg_session *session, 1284 1262 const struct vmmdev_request_header *req) ··· 1696 1670 } 1697 1671 1698 1672 /** 1699 - * Common IOCtl for user to kernel communication. 1700 - * Return: 0 or negative errno value. 1673 + * vbg_core_ioctl - Common IOCtl for user to kernel communication. 1701 1674 * @session: The client session. 1702 1675 * @req: The requested function. 1703 1676 * @data: The i/o data buffer, minimum size sizeof(struct vbg_ioctl_hdr). 1677 + * 1678 + * Return: %0 or negative errno value. 1704 1679 */ 1705 1680 int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data) 1706 1681 { ··· 1771 1744 } 1772 1745 1773 1746 /** 1774 - * Report guest supported mouse-features to the host. 1747 + * vbg_core_set_mouse_status - Report guest supported mouse-features to the host. 1775 1748 * 1776 - * Return: 0 or negative errno value. 1777 1749 * @gdev: The Guest extension device. 1778 1750 * @features: The set of features to report to the host. 1751 + * 1752 + * Return: %0 or negative errno value. 1779 1753 */ 1780 1754 int vbg_core_set_mouse_status(struct vbg_dev *gdev, u32 features) 1781 1755 { ··· 1800 1772 return vbg_status_code_to_errno(rc); 1801 1773 } 1802 1774 1803 - /** Core interrupt service routine. */ 1775 + /* Core interrupt service routine. */ 1804 1776 irqreturn_t vbg_core_isr(int irq, void *dev_id) 1805 1777 { 1806 1778 struct vbg_dev *gdev = dev_id;