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

thunderbolt: Update ctl.c function documentation

Make ctl.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Alan Borzeszkowski and committed by
Mika Westerberg
38f33b8e 66cf14cc

+25 -8
+25 -8
drivers/thunderbolt/ctl.c
··· 82 82 * 83 83 * This is refcounted object so when you are done with this, call 84 84 * tb_cfg_request_put() to it. 85 + * 86 + * Return: &struct tb_cfg_request on success, %NULL otherwise. 85 87 */ 86 88 struct tb_cfg_request *tb_cfg_request_alloc(void) 87 89 { ··· 361 359 * 362 360 * len must be a multiple of four. 363 361 * 364 - * Return: Returns 0 on success or an error code on failure. 362 + * Return: %0 on success, negative errno otherwise. 365 363 */ 366 364 static int tb_ctl_tx(struct tb_ctl *ctl, const void *data, size_t len, 367 365 enum tb_cfg_pkg_type type) ··· 541 539 * 542 540 * This queues @req on the given control channel without waiting for it 543 541 * to complete. When the request completes @callback is called. 542 + * 543 + * Return: %0 on success, negative errno otherwise. 544 544 */ 545 545 int tb_cfg_request(struct tb_ctl *ctl, struct tb_cfg_request *req, 546 546 void (*callback)(void *), void *callback_data) ··· 609 605 * triggers the request is canceled before function returns. Note the 610 606 * caller needs to make sure only one message for given switch is active 611 607 * at a time. 608 + * 609 + * Return: &struct tb_cfg_result with non-zero @err field if error 610 + * has occurred. 612 611 */ 613 612 struct tb_cfg_result tb_cfg_request_sync(struct tb_ctl *ctl, 614 613 struct tb_cfg_request *req, ··· 648 641 * 649 642 * cb will be invoked once for every hot plug event. 650 643 * 651 - * Return: Returns a pointer on success or NULL on failure. 644 + * Return: Pointer to &struct tb_ctl, %NULL on failure. 652 645 */ 653 646 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int index, int timeout_msec, 654 647 event_cb cb, void *cb_data) ··· 771 764 * @route: Router that originated the event 772 765 * @error: Pointer to the notification package 773 766 * 774 - * Call this as response for non-plug notification to ack it. Returns 775 - * %0 on success or an error code on failure. 767 + * Call this as a response for non-plug notification to ack it. 768 + * 769 + * Return: %0 on success, negative errno otherwise. 776 770 */ 777 771 int tb_cfg_ack_notification(struct tb_ctl *ctl, u64 route, 778 772 const struct cfg_error_pkg *error) ··· 835 827 * @port: Port where the hot plug/unplug happened 836 828 * @unplug: Ack hot plug or unplug 837 829 * 838 - * Call this as response for hot plug/unplug event to ack it. 839 - * Returns %0 on success or an error code on failure. 830 + * Call this as a response for hot plug/unplug event to ack it. 831 + * 832 + * Return: %0 on success, negative errno otherwise. 840 833 */ 841 834 int tb_cfg_ack_plug(struct tb_ctl *ctl, u64 route, u32 port, bool unplug) 842 835 { ··· 904 895 * If the switch at route is incorrectly configured then we will not receive a 905 896 * reply (even though the switch will reset). The caller should check for 906 897 * -ETIMEDOUT and attempt to reconfigure the switch. 898 + * 899 + * Return: &struct tb_cfg_result with non-zero @err field if error 900 + * has occurred. 907 901 */ 908 902 struct tb_cfg_result tb_cfg_reset(struct tb_ctl *ctl, u64 route) 909 903 { ··· 949 937 * @timeout_msec: Timeout in ms how long to wait for the response 950 938 * 951 939 * Reads from router config space without translating the possible error. 940 + * 941 + * Return: &struct tb_cfg_result with non-zero @err field if error 942 + * has occurred. 952 943 */ 953 944 struct tb_cfg_result tb_cfg_read_raw(struct tb_ctl *ctl, void *buffer, 954 945 u64 route, u32 port, enum tb_cfg_space space, ··· 1023 1008 * @timeout_msec: Timeout in ms how long to wait for the response 1024 1009 * 1025 1010 * Writes to router config space without translating the possible error. 1011 + * 1012 + * Return: &struct tb_cfg_result with non-zero @err field if error 1013 + * has occurred. 1026 1014 */ 1027 1015 struct tb_cfg_result tb_cfg_write_raw(struct tb_ctl *ctl, const void *buffer, 1028 1016 u64 route, u32 port, enum tb_cfg_space space, ··· 1168 1150 * Reads the first dword from the switches TB_CFG_SWITCH config area and 1169 1151 * returns the port number from which the reply originated. 1170 1152 * 1171 - * Return: Returns the upstream port number on success or an error code on 1172 - * failure. 1153 + * Return: Upstream port number on success or negative error code on failure. 1173 1154 */ 1174 1155 int tb_cfg_get_upstream_port(struct tb_ctl *ctl, u64 route) 1175 1156 {