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

scsi: ufs: Follow the kernel-doc syntax for documenting return values

Use 'Return:' to document the return value instead of 'Returns' as required
by the kernel-doc documentation.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230727194457.3152309-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
3a17fefe 2903265e

+126 -122
+5 -5
drivers/ufs/core/ufs-mcq.c
··· 105 105 * @hba: per adapter instance 106 106 * @req: pointer to the request to be issued 107 107 * 108 - * Returns the hardware queue instance on which the request would 108 + * Return: the hardware queue instance on which the request would 109 109 * be queued. 110 110 */ 111 111 struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba, ··· 121 121 * ufshcd_mcq_decide_queue_depth - decide the queue depth 122 122 * @hba: per adapter instance 123 123 * 124 - * Returns queue-depth on success, non-zero on error 124 + * Return: queue-depth on success, non-zero on error 125 125 * 126 126 * MAC - Max. Active Command of the Host Controller (HC) 127 127 * HC wouldn't send more than this commands to the device. ··· 493 493 * @hba: per adapter instance. 494 494 * @task_tag: The command's task tag. 495 495 * 496 - * Returns 0 for success; error code otherwise. 496 + * Return: 0 for success; error code otherwise. 497 497 */ 498 498 int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba, int task_tag) 499 499 { ··· 575 575 * @hwq: Hardware Queue to be searched. 576 576 * @task_tag: The command's task tag. 577 577 * 578 - * Returns true if the SQE containing the command is present in the SQ 578 + * Return: true if the SQE containing the command is present in the SQ 579 579 * (not fetched by the controller); returns false if the SQE is not in the SQ. 580 580 */ 581 581 static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba, ··· 624 624 * ufshcd_mcq_abort - Abort the command in MCQ. 625 625 * @cmd: The command to be aborted. 626 626 * 627 - * Returns SUCCESS or FAILED error codes 627 + * Return: SUCCESS or FAILED error codes 628 628 */ 629 629 int ufshcd_mcq_abort(struct scsi_cmnd *cmd) 630 630 {
+1 -1
drivers/ufs/core/ufshcd-priv.h
··· 294 294 * ufshcd_scsi_to_upiu_lun - maps scsi LUN to UPIU LUN 295 295 * @scsi_lun: scsi LUN id 296 296 * 297 - * Returns UPIU LUN id 297 + * Return: UPIU LUN id 298 298 */ 299 299 static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun) 300 300 {
+95 -91
drivers/ufs/core/ufshcd.c
··· 701 701 * @interval_us: polling interval in microseconds 702 702 * @timeout_ms: timeout in milliseconds 703 703 * 704 - * Return: 705 - * -ETIMEDOUT on error, zero on success. 704 + * Return: -ETIMEDOUT on error, zero on success. 706 705 */ 707 706 static int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask, 708 707 u32 val, unsigned long interval_us, ··· 729 730 * ufshcd_get_intr_mask - Get the interrupt bit mask 730 731 * @hba: Pointer to adapter instance 731 732 * 732 - * Returns interrupt bit mask per version 733 + * Return: interrupt bit mask per version 733 734 */ 734 735 static inline u32 ufshcd_get_intr_mask(struct ufs_hba *hba) 735 736 { ··· 745 746 * ufshcd_get_ufs_version - Get the UFS version supported by the HBA 746 747 * @hba: Pointer to adapter instance 747 748 * 748 - * Returns UFSHCI version supported by the controller 749 + * Return: UFSHCI version supported by the controller 749 750 */ 750 751 static inline u32 ufshcd_get_ufs_version(struct ufs_hba *hba) 751 752 { ··· 772 773 * the host controller 773 774 * @hba: pointer to adapter instance 774 775 * 775 - * Returns true if device present, false if no device detected 776 + * Return: true if device present, false if no device detected 776 777 */ 777 778 static inline bool ufshcd_is_device_present(struct ufs_hba *hba) 778 779 { ··· 785 786 * @cqe: pointer to the completion queue entry 786 787 * 787 788 * This function is used to get the OCS field from UTRD 788 - * Returns the OCS field in the UTRD 789 + * 790 + * Return: the OCS field in the UTRD. 789 791 */ 790 792 static enum utp_ocs ufshcd_get_tr_ocs(struct ufshcd_lrb *lrbp, 791 793 struct cq_entry *cqe) ··· 839 839 * ufshcd_get_lists_status - Check UCRDY, UTRLRDY and UTMRLRDY 840 840 * @reg: Register value of host controller status 841 841 * 842 - * Returns integer, 0 on Success and positive value if failed 842 + * Return: 0 on success; a positive value if failed. 843 843 */ 844 844 static inline int ufshcd_get_lists_status(u32 reg) 845 845 { ··· 851 851 * @hba: Pointer to adapter instance 852 852 * 853 853 * This function gets the result of UIC command completion 854 - * Returns 0 on success, non zero value on error 854 + * 855 + * Return: 0 on success; non-zero value on error. 855 856 */ 856 857 static inline int ufshcd_get_uic_cmd_result(struct ufs_hba *hba) 857 858 { ··· 865 864 * @hba: Pointer to adapter instance 866 865 * 867 866 * This function gets UIC command argument3 868 - * Returns 0 on success, non zero value on error 867 + * 868 + * Return: 0 on success; non-zero value on error. 869 869 */ 870 870 static inline u32 ufshcd_get_dme_attr_val(struct ufs_hba *hba) 871 871 { ··· 888 886 * @ucd_rsp_ptr: pointer to response UPIU 889 887 * 890 888 * This function gets the response status and scsi_status from response UPIU 891 - * Returns the response result code. 889 + * 890 + * Return: the response result code. 892 891 */ 893 892 static inline int 894 893 ufshcd_get_rsp_upiu_result(struct utp_upiu_rsp *ucd_rsp_ptr) ··· 902 899 * from response UPIU 903 900 * @ucd_rsp_ptr: pointer to response UPIU 904 901 * 905 - * Return the data segment length. 902 + * Return: the data segment length. 906 903 */ 907 904 static inline unsigned int 908 905 ufshcd_get_rsp_upiu_data_seg_len(struct utp_upiu_rsp *ucd_rsp_ptr) ··· 918 915 * The function checks if the device raised an exception event indicated in 919 916 * the Device Information field of response UPIU. 920 917 * 921 - * Returns true if exception is raised, false otherwise. 918 + * Return: true if exception is raised, false otherwise. 922 919 */ 923 920 static inline bool ufshcd_is_exception_event(struct utp_upiu_rsp *ucd_rsp_ptr) 924 921 { ··· 994 991 * ufshcd_is_hba_active - Get controller state 995 992 * @hba: per adapter instance 996 993 * 997 - * Returns true if and only if the controller is active. 994 + * Return: true if and only if the controller is active. 998 995 */ 999 996 static inline bool ufshcd_is_hba_active(struct ufs_hba *hba) 1000 997 { ··· 1030 1027 * @hba: per adapter instance 1031 1028 * @scale_up: If True, set max possible frequency othewise set low frequency 1032 1029 * 1033 - * Returns 0 if successful 1034 - * Returns < 0 for any other errors 1030 + * Return: 0 if successful; < 0 upon failure. 1035 1031 */ 1036 1032 static int ufshcd_set_clk_freq(struct ufs_hba *hba, bool scale_up) 1037 1033 { ··· 1092 1090 * @hba: per adapter instance 1093 1091 * @scale_up: True if scaling up and false if scaling down 1094 1092 * 1095 - * Returns 0 if successful 1096 - * Returns < 0 for any other errors 1093 + * Return: 0 if successful; < 0 upon failure. 1097 1094 */ 1098 1095 static int ufshcd_scale_clks(struct ufs_hba *hba, bool scale_up) 1099 1096 { ··· 1123 1122 * @hba: per adapter instance 1124 1123 * @scale_up: True if scaling up and false if scaling down 1125 1124 * 1126 - * Returns true if scaling is required, false otherwise. 1125 + * Return: true if scaling is required, false otherwise. 1127 1126 */ 1128 1127 static bool ufshcd_is_devfreq_scaling_required(struct ufs_hba *hba, 1129 1128 bool scale_up) ··· 1240 1239 * @hba: per adapter instance 1241 1240 * @scale_up: True for scaling up gear and false for scaling down 1242 1241 * 1243 - * Returns 0 for success, 1244 - * Returns -EBUSY if scaling can't happen at this time 1245 - * Returns non-zero for any other errors 1242 + * Return: 0 for success; -EBUSY if scaling can't happen at this time; 1243 + * non-zero for any other errors. 1246 1244 */ 1247 1245 static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up) 1248 1246 { ··· 1331 1331 * @hba: per adapter instance 1332 1332 * @scale_up: True for scaling up and false for scalin down 1333 1333 * 1334 - * Returns 0 for success, 1335 - * Returns -EBUSY if scaling can't happen at this time 1336 - * Returns non-zero for any other errors 1334 + * Return: 0 for success; -EBUSY if scaling can't happen at this time; non-zero 1335 + * for any other errors. 1337 1336 */ 1338 1337 static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up) 1339 1338 { ··· 2317 2318 * ufshcd_ready_for_uic_cmd - Check if controller is ready 2318 2319 * to accept UIC commands 2319 2320 * @hba: per adapter instance 2320 - * Return true on success, else false 2321 + * 2322 + * Return: true on success, else false. 2321 2323 */ 2322 2324 static inline bool ufshcd_ready_for_uic_cmd(struct ufs_hba *hba) 2323 2325 { ··· 2330 2330 * @hba: Pointer to adapter instance 2331 2331 * 2332 2332 * This function gets the UPMCRS field of HCS register 2333 - * Returns value of UPMCRS field 2333 + * 2334 + * Return: value of UPMCRS field. 2334 2335 */ 2335 2336 static inline u8 ufshcd_get_upmcrs(struct ufs_hba *hba) 2336 2337 { ··· 2369 2368 * @hba: per adapter instance 2370 2369 * @uic_cmd: UIC command 2371 2370 * 2372 - * Returns 0 only if success. 2371 + * Return: 0 only if success. 2373 2372 */ 2374 2373 static int 2375 2374 ufshcd_wait_for_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) ··· 2408 2407 * @uic_cmd: UIC command 2409 2408 * @completion: initialize the completion only if this is set to true 2410 2409 * 2411 - * Returns 0 only if success. 2410 + * Return: 0 only if success. 2412 2411 */ 2413 2412 static int 2414 2413 __ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd, ··· 2437 2436 * @hba: per adapter instance 2438 2437 * @uic_cmd: UIC command 2439 2438 * 2440 - * Returns 0 only if success. 2439 + * Return: 0 only if success. 2441 2440 */ 2442 2441 int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) 2443 2442 { ··· 2514 2513 * @hba: per adapter instance 2515 2514 * @lrbp: pointer to local reference block 2516 2515 * 2517 - * Returns 0 in case of success, non-zero value in case of failure 2516 + * Return: 0 in case of success, non-zero value in case of failure. 2518 2517 */ 2519 2518 static int ufshcd_map_sg(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) 2520 2519 { ··· 2766 2765 * ufshcd_upiu_wlun_to_scsi_wlun - maps UPIU W-LUN id to SCSI W-LUN ID 2767 2766 * @upiu_wlun_id: UPIU W-LUN id 2768 2767 * 2769 - * Returns SCSI W-LUN id 2768 + * Return: SCSI W-LUN id. 2770 2769 */ 2771 2770 static inline u16 ufshcd_upiu_wlun_to_scsi_wlun(u8 upiu_wlun_id) 2772 2771 { ··· 2837 2836 * @host: SCSI host pointer 2838 2837 * @cmd: command from SCSI Midlayer 2839 2838 * 2840 - * Returns 0 for success, non-zero in case of failure 2839 + * Return: 0 for success, non-zero in case of failure. 2841 2840 */ 2842 2841 static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 2843 2842 { ··· 2948 2947 * Check with the block layer if the command is inflight 2949 2948 * @cmd: command to check. 2950 2949 * 2951 - * Returns true if command is inflight; false if not. 2950 + * Return: true if command is inflight; false if not. 2952 2951 */ 2953 2952 bool ufshcd_cmd_inflight(struct scsi_cmnd *cmd) 2954 2953 { ··· 3246 3245 * @index: flag index to access 3247 3246 * @flag_res: the flag value after the query request completes 3248 3247 * 3249 - * Returns 0 for success, non-zero in case of failure 3248 + * Return: 0 for success, non-zero in case of failure. 3250 3249 */ 3251 3250 int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode, 3252 3251 enum flag_idn idn, u8 index, bool *flag_res) ··· 3315 3314 * @selector: selector field 3316 3315 * @attr_val: the attribute value after the query request completes 3317 3316 * 3318 - * Returns 0 for success, non-zero in case of failure 3317 + * Return: 0 for success, non-zero in case of failure. 3319 3318 */ 3320 3319 int ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode, 3321 3320 enum attr_idn idn, u8 index, u8 selector, u32 *attr_val) ··· 3380 3379 * @attr_val: the attribute value after the query request 3381 3380 * completes 3382 3381 * 3383 - * Returns 0 for success, non-zero in case of failure 3382 + * Return: 0 for success, non-zero in case of failure. 3384 3383 */ 3385 3384 int ufshcd_query_attr_retry(struct ufs_hba *hba, 3386 3385 enum query_opcode opcode, enum attr_idn idn, u8 index, u8 selector, ··· 3478 3477 * @desc_buf: the buffer that contains the descriptor 3479 3478 * @buf_len: length parameter passed to the device 3480 3479 * 3481 - * Returns 0 for success, non-zero in case of failure. 3482 3480 * The buf_len parameter will contain, on return, the length parameter 3483 3481 * received on the response. 3482 + * 3483 + * Return: 0 for success, non-zero in case of failure. 3484 3484 */ 3485 3485 int ufshcd_query_descriptor_retry(struct ufs_hba *hba, 3486 3486 enum query_opcode opcode, ··· 3511 3509 * @param_read_buf: pointer to buffer where parameter would be read 3512 3510 * @param_size: sizeof(param_read_buf) 3513 3511 * 3514 - * Return 0 in case of success, non-zero otherwise 3512 + * Return: 0 in case of success, non-zero otherwise. 3515 3513 */ 3516 3514 int ufshcd_read_desc_param(struct ufs_hba *hba, 3517 3515 enum desc_idn desc_id, ··· 3691 3689 * @param_read_buf: pointer to buffer where parameter would be read 3692 3690 * @param_size: sizeof(param_read_buf) 3693 3691 * 3694 - * Return 0 in case of success, non-zero otherwise 3692 + * Return: 0 in case of success, non-zero otherwise. 3695 3693 */ 3696 3694 static inline int ufshcd_read_unit_desc_param(struct ufs_hba *hba, 3697 3695 int lun, ··· 3746 3744 * (UTMRDL) 3747 3745 * 4. Allocate memory for local reference block(lrb). 3748 3746 * 3749 - * Returns 0 for success, non-zero in case of failure 3747 + * Return: 0 for success, non-zero in case of failure. 3750 3748 */ 3751 3749 static int ufshcd_memory_alloc(struct ufs_hba *hba) 3752 3750 { ··· 3893 3891 * Once the Unipro links are up, the device connected to the controller 3894 3892 * is detected. 3895 3893 * 3896 - * Returns 0 on success, non-zero value on failure 3894 + * Return: 0 on success, non-zero value on failure. 3897 3895 */ 3898 3896 static int ufshcd_dme_link_startup(struct ufs_hba *hba) 3899 3897 { ··· 3915 3913 * DME_RESET command is issued in order to reset UniPro stack. 3916 3914 * This function now deals with cold reset. 3917 3915 * 3918 - * Returns 0 on success, non-zero value on failure 3916 + * Return: 0 on success, non-zero value on failure. 3919 3917 */ 3920 3918 static int ufshcd_dme_reset(struct ufs_hba *hba) 3921 3919 { ··· 3954 3952 * 3955 3953 * DME_ENABLE command is issued in order to enable UniPro stack. 3956 3954 * 3957 - * Returns 0 on success, non-zero value on failure 3955 + * Return: 0 on success, non-zero value on failure. 3958 3956 */ 3959 3957 static int ufshcd_dme_enable(struct ufs_hba *hba) 3960 3958 { ··· 4010 4008 * @mib_val: setting value as uic command argument3 4011 4009 * @peer: indicate whether peer or local 4012 4010 * 4013 - * Returns 0 on success, non-zero value on failure 4011 + * Return: 0 on success, non-zero value on failure. 4014 4012 */ 4015 4013 int ufshcd_dme_set_attr(struct ufs_hba *hba, u32 attr_sel, 4016 4014 u8 attr_set, u32 mib_val, u8 peer) ··· 4054 4052 * @mib_val: the value of the attribute as returned by the UIC command 4055 4053 * @peer: indicate whether peer or local 4056 4054 * 4057 - * Returns 0 on success, non-zero value on failure 4055 + * Return: 0 on success, non-zero value on failure. 4058 4056 */ 4059 4057 int ufshcd_dme_get_attr(struct ufs_hba *hba, u32 attr_sel, 4060 4058 u32 *mib_val, u8 peer) ··· 4135 4133 * addition to normal UIC command completion Status (UCCS). This function only 4136 4134 * returns after the relevant status bits indicate the completion. 4137 4135 * 4138 - * Returns 0 on success, non-zero value on failure 4136 + * Return: 0 on success, non-zero value on failure. 4139 4137 */ 4140 4138 static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd) 4141 4139 { ··· 4225 4223 * @hba: per adapter instance 4226 4224 * @mode: powr mode value 4227 4225 * 4228 - * Returns 0 on success, non-zero value on failure 4226 + * Return: 0 on success, non-zero value on failure. 4229 4227 */ 4230 4228 int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode) 4231 4229 { ··· 4618 4616 * 3. Program UTRL and UTMRL base address 4619 4617 * 4. Configure run-stop-registers 4620 4618 * 4621 - * Returns 0 on success, non-zero value on failure 4619 + * Return: 0 on success, non-zero value on failure. 4622 4620 */ 4623 4621 int ufshcd_make_hba_operational(struct ufs_hba *hba) 4624 4622 { ··· 4699 4697 * sequence kicks off. When controller is ready it will set 4700 4698 * the Host Controller Enable bit to 1. 4701 4699 * 4702 - * Returns 0 on success, non-zero value on failure 4700 + * Return: 0 on success, non-zero value on failure. 4703 4701 */ 4704 4702 static int ufshcd_hba_execute_hce(struct ufs_hba *hba) 4705 4703 { ··· 4844 4842 * ufshcd_link_startup - Initialize unipro link startup 4845 4843 * @hba: per adapter instance 4846 4844 * 4847 - * Returns 0 for success, non-zero in case of failure 4845 + * Return: 0 for success, non-zero in case of failure. 4848 4846 */ 4849 4847 static int ufshcd_link_startup(struct ufs_hba *hba) 4850 4848 { ··· 5063 5061 * ufshcd_slave_alloc - handle initial SCSI device configurations 5064 5062 * @sdev: pointer to SCSI device 5065 5063 * 5066 - * Returns success 5064 + * Return: success. 5067 5065 */ 5068 5066 static int ufshcd_slave_alloc(struct scsi_device *sdev) 5069 5067 { ··· 5181 5179 * @lrbp: pointer to local reference block of completed command 5182 5180 * @scsi_status: SCSI command status 5183 5181 * 5184 - * Returns value base on SCSI command status 5182 + * Return: value base on SCSI command status. 5185 5183 */ 5186 5184 static inline int 5187 5185 ufshcd_scsi_cmd_status(struct ufshcd_lrb *lrbp, int scsi_status) ··· 5215 5213 * @lrbp: pointer to local reference block of completed command 5216 5214 * @cqe: pointer to the completion queue entry 5217 5215 * 5218 - * Returns result of the command to notify SCSI midlayer 5216 + * Return: result of the command to notify SCSI midlayer. 5219 5217 */ 5220 5218 static inline int 5221 5219 ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp, ··· 5350 5348 * @hba: per adapter instance 5351 5349 * @intr_status: interrupt status generated by the controller 5352 5350 * 5353 - * Returns 5351 + * Return: 5354 5352 * IRQ_HANDLED - If interrupt is valid 5355 5353 * IRQ_NONE - If invalid interrupt 5356 5354 */ ··· 5470 5468 } 5471 5469 5472 5470 /* 5473 - * Returns > 0 if one or more commands have been completed or 0 if no 5471 + * Return: > 0 if one or more commands have been completed or 0 if no 5474 5472 * requests have been completed. 5475 5473 */ 5476 5474 static int ufshcd_poll(struct Scsi_Host *shost, unsigned int queue_num) ··· 5560 5558 * ufshcd_transfer_req_compl - handle SCSI and query command completion 5561 5559 * @hba: per adapter instance 5562 5560 * 5563 - * Returns 5561 + * Return: 5564 5562 * IRQ_HANDLED - If interrupt is valid 5565 5563 * IRQ_NONE - If invalid interrupt 5566 5564 */ ··· 5637 5635 * Disables exception event in the device so that the EVENT_ALERT 5638 5636 * bit is not set. 5639 5637 * 5640 - * Returns zero on success, non-zero error value on failure. 5638 + * Return: zero on success, non-zero error value on failure. 5641 5639 */ 5642 5640 static inline int ufshcd_disable_ee(struct ufs_hba *hba, u16 mask) 5643 5641 { ··· 5652 5650 * Enable corresponding exception event in the device to allow 5653 5651 * device to alert host in critical scenarios. 5654 5652 * 5655 - * Returns zero on success, non-zero error value on failure. 5653 + * Return: zero on success, non-zero error value on failure. 5656 5654 */ 5657 5655 static inline int ufshcd_enable_ee(struct ufs_hba *hba, u16 mask) 5658 5656 { ··· 5668 5666 * as the device is allowed to manage its own way of handling background 5669 5667 * operations. 5670 5668 * 5671 - * Returns zero on success, non-zero on failure. 5669 + * Return: zero on success, non-zero on failure. 5672 5670 */ 5673 5671 static int ufshcd_enable_auto_bkops(struct ufs_hba *hba) 5674 5672 { ··· 5707 5705 * host is idle so that BKOPS are managed effectively without any negative 5708 5706 * impacts. 5709 5707 * 5710 - * Returns zero on success, non-zero on failure. 5708 + * Return: zero on success, non-zero on failure. 5711 5709 */ 5712 5710 static int ufshcd_disable_auto_bkops(struct ufs_hba *hba) 5713 5711 { ··· 5783 5781 * bkops_status is greater than or equal to "status" argument passed to 5784 5782 * this function, disable otherwise. 5785 5783 * 5786 - * Returns 0 for success, non-zero in case of failure. 5784 + * Return: 0 for success, non-zero in case of failure. 5787 5785 * 5788 5786 * NOTE: Caller of this function can check the "hba->auto_bkops_enabled" flag 5789 5787 * to know whether auto bkops is enabled or disabled after this function ··· 6135 6133 * to recover from the DL NAC errors or not. 6136 6134 * @hba: per-adapter instance 6137 6135 * 6138 - * Returns true if error handling is required, false otherwise 6136 + * Return: true if error handling is required, false otherwise. 6139 6137 */ 6140 6138 static bool ufshcd_quirk_dl_nac_errors(struct ufs_hba *hba) 6141 6139 { ··· 6596 6594 * ufshcd_update_uic_error - check and set fatal UIC error flags. 6597 6595 * @hba: per-adapter instance 6598 6596 * 6599 - * Returns 6597 + * Return: 6600 6598 * IRQ_HANDLED - If interrupt is valid 6601 6599 * IRQ_NONE - If invalid interrupt 6602 6600 */ ··· 6689 6687 * @hba: per-adapter instance 6690 6688 * @intr_status: interrupt status generated by the controller 6691 6689 * 6692 - * Returns 6690 + * Return: 6693 6691 * IRQ_HANDLED - If interrupt is valid 6694 6692 * IRQ_NONE - If invalid interrupt 6695 6693 */ ··· 6765 6763 * ufshcd_tmc_handler - handle task management function completion 6766 6764 * @hba: per adapter instance 6767 6765 * 6768 - * Returns 6766 + * Return: 6769 6767 * IRQ_HANDLED - If interrupt is valid 6770 6768 * IRQ_NONE - If invalid interrupt 6771 6769 */ ··· 6794 6792 * ufshcd_handle_mcq_cq_events - handle MCQ completion queue events 6795 6793 * @hba: per adapter instance 6796 6794 * 6797 - * Returns IRQ_HANDLED if interrupt is handled 6795 + * Return: IRQ_HANDLED if interrupt is handled. 6798 6796 */ 6799 6797 static irqreturn_t ufshcd_handle_mcq_cq_events(struct ufs_hba *hba) 6800 6798 { ··· 6829 6827 * @hba: per adapter instance 6830 6828 * @intr_status: contains interrupts generated by the controller 6831 6829 * 6832 - * Returns 6830 + * Return: 6833 6831 * IRQ_HANDLED - If interrupt is valid 6834 6832 * IRQ_NONE - If invalid interrupt 6835 6833 */ ··· 6860 6858 * @irq: irq number 6861 6859 * @__hba: pointer to adapter instance 6862 6860 * 6863 - * Returns 6861 + * Return: 6864 6862 * IRQ_HANDLED - If interrupt is valid 6865 6863 * IRQ_NONE - If invalid interrupt 6866 6864 */ ··· 7009 7007 * @tm_function: task management function opcode 7010 7008 * @tm_response: task management service response return value 7011 7009 * 7012 - * Returns non-zero value on error, zero on success. 7010 + * Return: non-zero value on error, zero on success. 7013 7011 */ 7014 7012 static int ufshcd_issue_tm_cmd(struct ufs_hba *hba, int lun_id, int task_id, 7015 7013 u8 tm_function, u8 *tm_response) ··· 7233 7231 * @sg_list: Pointer to SG list when DATA IN/OUT UPIU is required in ARPMB operation 7234 7232 * @dir: DMA direction 7235 7233 * 7236 - * Returns zero on success, non-zero on failure 7234 + * Return: zero on success, non-zero on failure. 7237 7235 */ 7238 7236 int ufshcd_advanced_rpmb_req_handler(struct ufs_hba *hba, struct utp_upiu_req *req_upiu, 7239 7237 struct utp_upiu_req *rsp_upiu, struct ufs_ehs *req_ehs, ··· 7319 7317 * ufshcd_eh_device_reset_handler() - Reset a single logical unit. 7320 7318 * @cmd: SCSI command pointer 7321 7319 * 7322 - * Returns SUCCESS/FAILED 7320 + * Return: SUCCESS or FAILED. 7323 7321 */ 7324 7322 static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) 7325 7323 { ··· 7414 7412 * issued. To avoid that, first issue UFS_QUERY_TASK to check if the command is 7415 7413 * really issued and then try to abort it. 7416 7414 * 7417 - * Returns zero on success, non-zero on failure 7415 + * Return: zero on success, non-zero on failure. 7418 7416 */ 7419 7417 int ufshcd_try_to_abort_task(struct ufs_hba *hba, int tag) 7420 7418 { ··· 7502 7500 * ufshcd_abort - scsi host template eh_abort_handler callback 7503 7501 * @cmd: SCSI command pointer 7504 7502 * 7505 - * Returns SUCCESS/FAILED 7503 + * Return: SUCCESS or FAILED. 7506 7504 */ 7507 7505 static int ufshcd_abort(struct scsi_cmnd *cmd) 7508 7506 { ··· 7627 7625 * local and remote (device) Uni-Pro stack and the attributes 7628 7626 * are reset to default state. 7629 7627 * 7630 - * Returns zero on success, non-zero on failure 7628 + * Return: zero on success, non-zero on failure. 7631 7629 */ 7632 7630 static int ufshcd_host_reset_and_restore(struct ufs_hba *hba) 7633 7631 { ··· 7664 7662 * Reset and recover device, host and re-establish link. This 7665 7663 * is helpful to recover the communication in fatal error conditions. 7666 7664 * 7667 - * Returns zero on success, non-zero on failure 7665 + * Return: zero on success, non-zero on failure. 7668 7666 */ 7669 7667 static int ufshcd_reset_and_restore(struct ufs_hba *hba) 7670 7668 { ··· 7722 7720 * ufshcd_eh_host_reset_handler - host reset handler registered to scsi layer 7723 7721 * @cmd: SCSI command pointer 7724 7722 * 7725 - * Returns SUCCESS/FAILED 7723 + * Return: SUCCESS or FAILED. 7726 7724 */ 7727 7725 static int ufshcd_eh_host_reset_handler(struct scsi_cmnd *cmd) 7728 7726 { ··· 7754 7752 * @start_scan: row at the desc table to start scan from 7755 7753 * @buff: power descriptor buffer 7756 7754 * 7757 - * Returns calculated max ICC level for specific regulator 7755 + * Return: calculated max ICC level for specific regulator. 7758 7756 */ 7759 7757 static u32 ufshcd_get_max_icc_level(int sup_curr_uA, u32 start_scan, 7760 7758 const char *buff) ··· 7800 7798 * @hba: per-adapter instance 7801 7799 * @desc_buf: power descriptor buffer to extract ICC levels from. 7802 7800 * 7803 - * Returns calculated ICC level 7801 + * Return: calculated ICC level. 7804 7802 */ 7805 7803 static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba, 7806 7804 const u8 *desc_buf) ··· 7909 7907 * This function adds scsi device instances for each of all well known LUs 7910 7908 * (except "REPORT LUNS" LU). 7911 7909 * 7912 - * Returns zero on success (all required W-LUs are added successfully), 7910 + * Return: zero on success (all required W-LUs are added successfully), 7913 7911 * non-zero error value on failure (if failed to add any of the required W-LU). 7914 7912 */ 7915 7913 static int ufshcd_scsi_add_wlus(struct ufs_hba *hba) ··· 8178 8176 * RX_MIN_ACTIVATETIME_CAPABILITY attribute. This optimal value can help reduce 8179 8177 * the hibern8 exit latency. 8180 8178 * 8181 - * Returns zero on success, non-zero error value on failure. 8179 + * Return: zero on success, non-zero error value on failure. 8182 8180 */ 8183 8181 static int ufshcd_tune_pa_tactivate(struct ufs_hba *hba) 8184 8182 { ··· 8213 8211 * TX_HIBERN8TIME_CAPABILITY & peer M-PHY's RX_HIBERN8TIME_CAPABILITY. 8214 8212 * This optimal value can help reduce the hibern8 exit latency. 8215 8213 * 8216 - * Returns zero on success, non-zero error value on failure. 8214 + * Return: zero on success, non-zero error value on failure. 8217 8215 */ 8218 8216 static int ufshcd_tune_pa_hibern8time(struct ufs_hba *hba) 8219 8217 { ··· 8255 8253 * PA_TACTIVATE, we need to enable UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE quirk 8256 8254 * for such devices. 8257 8255 * 8258 - * Returns zero on success, non-zero error value on failure. 8256 + * Return: zero on success, non-zero error value on failure. 8259 8257 */ 8260 8258 static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba) 8261 8259 { ··· 9257 9255 * @hba: per adapter instance 9258 9256 * @pwr_mode: device power mode to set 9259 9257 * 9260 - * Returns 0 if requested power mode is set successfully 9261 - * Returns < 0 if failed to set the requested power mode 9258 + * Return: 0 if requested power mode is set successfully; 9259 + * < 0 if failed to set the requested power mode. 9262 9260 */ 9263 9261 static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba, 9264 9262 enum ufs_dev_pwr_mode pwr_mode) ··· 9878 9876 * This function basically turns on the regulators, clocks and 9879 9877 * irqs of the hba. 9880 9878 * 9881 - * Returns 0 for success and non-zero for failure 9879 + * Return: 0 for success and non-zero for failure. 9882 9880 */ 9883 9881 static int ufshcd_resume(struct ufs_hba *hba) 9884 9882 { ··· 9919 9917 * Executed before putting the system into a sleep state in which the contents 9920 9918 * of main memory are preserved. 9921 9919 * 9922 - * Returns 0 for success and non-zero for failure 9920 + * Return: 0 for success and non-zero for failure. 9923 9921 */ 9924 9922 int ufshcd_system_suspend(struct device *dev) 9925 9923 { ··· 9946 9944 * Executed after waking the system up from a sleep state in which the contents 9947 9945 * of main memory were preserved. 9948 9946 * 9949 - * Returns 0 for success and non-zero for failure 9947 + * Return: 0 for success and non-zero for failure. 9950 9948 */ 9951 9949 int ufshcd_system_resume(struct device *dev) 9952 9950 { ··· 9976 9974 * 9977 9975 * Check the description of ufshcd_suspend() function for more details. 9978 9976 * 9979 - * Returns 0 for success and non-zero for failure 9977 + * Return: 0 for success and non-zero for failure. 9980 9978 */ 9981 9979 int ufshcd_runtime_suspend(struct device *dev) 9982 9980 { ··· 10136 10134 * addressing capability 10137 10135 * @hba: per adapter instance 10138 10136 * 10139 - * Returns 0 for success, non-zero for failure 10137 + * Return: 0 for success, non-zero for failure. 10140 10138 */ 10141 10139 static int ufshcd_set_dma_mask(struct ufs_hba *hba) 10142 10140 { ··· 10151 10149 * ufshcd_alloc_host - allocate Host Bus Adapter (HBA) 10152 10150 * @dev: pointer to device handle 10153 10151 * @hba_handle: driver private handle 10154 - * Returns 0 on success, non-zero value on failure 10152 + * 10153 + * Return: 0 on success, non-zero value on failure. 10155 10154 */ 10156 10155 int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle) 10157 10156 { ··· 10208 10205 * @hba: per-adapter instance 10209 10206 * @mmio_base: base register address 10210 10207 * @irq: Interrupt line of device 10211 - * Returns 0 on success, non-zero value on failure 10208 + * 10209 + * Return: 0 on success, non-zero value on failure. 10212 10210 */ 10213 10211 int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) 10214 10212 {
+5 -5
drivers/ufs/host/cdns-pltfrm.c
··· 105 105 * Sets HCLKDIV register value based on the core_clk 106 106 * @hba: host controller instance 107 107 * 108 - * Return zero for success and non-zero for failure 108 + * Return: zero for success and non-zero for failure. 109 109 */ 110 110 static int cdns_ufs_set_hclkdiv(struct ufs_hba *hba) 111 111 { ··· 148 148 * @hba: host controller instance 149 149 * @status: notify stage (pre, post change) 150 150 * 151 - * Return zero for success and non-zero for failure 151 + * Return: zero for success and non-zero for failure. 152 152 */ 153 153 static int cdns_ufs_hce_enable_notify(struct ufs_hba *hba, 154 154 enum ufs_notify_change_status status) ··· 182 182 * @hba: host controller instance 183 183 * @status: notify stage (pre, post change) 184 184 * 185 - * Return zero for success and non-zero for failure 185 + * Return: zero for success and non-zero for failure. 186 186 */ 187 187 static int cdns_ufs_link_startup_notify(struct ufs_hba *hba, 188 188 enum ufs_notify_change_status status) ··· 212 212 * cdns_ufs_init - performs additional ufs initialization 213 213 * @hba: host controller instance 214 214 * 215 - * Returns status of initialization 215 + * Return: status of initialization. 216 216 */ 217 217 static int cdns_ufs_init(struct ufs_hba *hba) 218 218 { ··· 284 284 * cdns_ufs_pltfrm_probe - probe routine of the driver 285 285 * @pdev: pointer to platform device handle 286 286 * 287 - * Return zero for success and non-zero for failure 287 + * Return: zero for success and non-zero for failure. 288 288 */ 289 289 static int cdns_ufs_pltfrm_probe(struct platform_device *pdev) 290 290 {
+1 -1
drivers/ufs/host/tc-dwc-g210-pci.c
··· 51 51 * @pdev: pointer to PCI device handle 52 52 * @id: PCI device id 53 53 * 54 - * Returns 0 on success, non-zero value on failure 54 + * Return: 0 on success, non-zero value on failure. 55 55 */ 56 56 static int 57 57 tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+6 -6
drivers/ufs/host/tc-dwc-g210.c
··· 21 21 * This function configures Synopsys TC specific atributes (40-bit RMMI) 22 22 * @hba: Pointer to drivers structure 23 23 * 24 - * Returns 0 on success or non-zero value on failure 24 + * Return: 0 on success or non-zero value on failure. 25 25 */ 26 26 static int tc_dwc_g210_setup_40bit_rmmi(struct ufs_hba *hba) 27 27 { ··· 85 85 * This function configures Synopsys TC 20-bit RMMI Lane 0 86 86 * @hba: Pointer to drivers structure 87 87 * 88 - * Returns 0 on success or non-zero value on failure 88 + * Return: 0 on success or non-zero value on failure. 89 89 */ 90 90 static int tc_dwc_g210_setup_20bit_rmmi_lane0(struct ufs_hba *hba) 91 91 { ··· 138 138 * This function configures Synopsys TC 20-bit RMMI Lane 1 139 139 * @hba: Pointer to drivers structure 140 140 * 141 - * Returns 0 on success or non-zero value on failure 141 + * Return: 0 on success or non-zero value on failure. 142 142 */ 143 143 static int tc_dwc_g210_setup_20bit_rmmi_lane1(struct ufs_hba *hba) 144 144 { ··· 215 215 * This function configures Synopsys TC specific atributes (20-bit RMMI) 216 216 * @hba: Pointer to drivers structure 217 217 * 218 - * Returns 0 on success or non-zero value on failure 218 + * Return: 0 on success or non-zero value on failure. 219 219 */ 220 220 static int tc_dwc_g210_setup_20bit_rmmi(struct ufs_hba *hba) 221 221 { ··· 256 256 * 257 257 * @hba: Pointer to drivers structure 258 258 * 259 - * Returns 0 on success non-zero value on failure 259 + * Return: 0 on success non-zero value on failure. 260 260 */ 261 261 int tc_dwc_g210_config_40_bit(struct ufs_hba *hba) 262 262 { ··· 288 288 * 289 289 * @hba: Pointer to drivers structure 290 290 * 291 - * Returns 0 on success non-zero value on failure 291 + * Return: 0 on success non-zero value on failure. 292 292 */ 293 293 int tc_dwc_g210_config_20_bit(struct ufs_hba *hba) 294 294 {
+3 -3
drivers/ufs/host/ufs-mediatek.c
··· 666 666 * @on: If true, enable clocks else disable them. 667 667 * @status: PRE_CHANGE or POST_CHANGE notify 668 668 * 669 - * Returns 0 on success, non-zero on failure. 669 + * Return: 0 on success, non-zero on failure. 670 670 */ 671 671 static int ufs_mtk_setup_clocks(struct ufs_hba *hba, bool on, 672 672 enum ufs_notify_change_status status) ··· 885 885 * Binds PHY with controller and powers up PHY enabling clocks 886 886 * and regulators. 887 887 * 888 - * Returns -EPROBE_DEFER if binding fails, returns negative error 888 + * Return: -EPROBE_DEFER if binding fails, returns negative error 889 889 * on phy power up failure and returns zero on success. 890 890 */ 891 891 static int ufs_mtk_init(struct ufs_hba *hba) ··· 1696 1696 * ufs_mtk_probe - probe routine of the driver 1697 1697 * @pdev: pointer to Platform device handle 1698 1698 * 1699 - * Return zero for success and non-zero for failure 1699 + * Return: zero for success and non-zero for failure. 1700 1700 */ 1701 1701 static int ufs_mtk_probe(struct platform_device *pdev) 1702 1702 {
+4 -4
drivers/ufs/host/ufs-qcom.c
··· 485 485 } 486 486 487 487 /* 488 - * Returns zero for success and non-zero in case of a failure 488 + * Return: zero for success and non-zero in case of a failure. 489 489 */ 490 490 static int ufs_qcom_cfg_timers(struct ufs_hba *hba, u32 gear, 491 491 u32 hs, u32 rate, bool update_link_startup_timer) ··· 964 964 * @on: If true, enable clocks else disable them. 965 965 * @status: PRE_CHANGE or POST_CHANGE notify 966 966 * 967 - * Returns 0 on success, non-zero on failure. 967 + * Return: 0 on success, non-zero on failure. 968 968 */ 969 969 static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on, 970 970 enum ufs_notify_change_status status) ··· 1038 1038 * Binds PHY with controller and powers up PHY enabling clocks 1039 1039 * and regulators. 1040 1040 * 1041 - * Returns -EPROBE_DEFER if binding fails, returns negative error 1041 + * Return: -EPROBE_DEFER if binding fails, returns negative error 1042 1042 * on phy power up failure and returns zero on success. 1043 1043 */ 1044 1044 static int ufs_qcom_init(struct ufs_hba *hba) ··· 1756 1756 * ufs_qcom_probe - probe routine of the driver 1757 1757 * @pdev: pointer to Platform device handle 1758 1758 * 1759 - * Return zero for success and non-zero for failure 1759 + * Return: zero for success and non-zero for failure. 1760 1760 */ 1761 1761 static int ufs_qcom_probe(struct platform_device *pdev) 1762 1762 {
+3 -3
drivers/ufs/host/ufshcd-dwc.c
··· 51 51 * Check if link is up 52 52 * @hba: private structure pointer 53 53 * 54 - * Returns 0 on success, non-zero value on failure 54 + * Return: 0 on success, non-zero value on failure. 55 55 */ 56 56 static int ufshcd_dwc_link_is_up(struct ufs_hba *hba) 57 57 { ··· 78 78 * 79 79 * @hba: pointer to drivers private data 80 80 * 81 - * Returns 0 on success non-zero value on failure 81 + * Return: 0 on success non-zero value on failure. 82 82 */ 83 83 static int ufshcd_dwc_connection_setup(struct ufs_hba *hba) 84 84 { ··· 112 112 * @hba: private structure pointer 113 113 * @status: Callback notify status 114 114 * 115 - * Returns 0 on success, non-zero value on failure 115 + * Return: 0 on success, non-zero value on failure. 116 116 */ 117 117 int ufshcd_dwc_link_startup_notify(struct ufs_hba *hba, 118 118 enum ufs_notify_change_status status)
+1 -1
drivers/ufs/host/ufshcd-pci.c
··· 524 524 * @pdev: pointer to PCI device handle 525 525 * @id: PCI device id 526 526 * 527 - * Returns 0 on success, non-zero value on failure 527 + * Return: 0 on success, non-zero value on failure. 528 528 */ 529 529 static int 530 530 ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+2 -2
drivers/ufs/host/ufshcd-pltfrm.c
··· 212 212 * @dev_max: pointer to device attributes 213 213 * @agreed_pwr: returned agreed attributes 214 214 * 215 - * Returns 0 on success, non-zero value on failure 215 + * Return: 0 on success, non-zero value on failure. 216 216 */ 217 217 int ufshcd_get_pwr_dev_param(const struct ufs_dev_params *pltfrm_param, 218 218 const struct ufs_pa_layer_attr *dev_max, ··· 326 326 * @pdev: pointer to Platform device handle 327 327 * @vops: pointer to variant ops 328 328 * 329 - * Returns 0 on success, non-zero value on failure 329 + * Return: 0 on success, non-zero value on failure. 330 330 */ 331 331 int ufshcd_pltfrm_init(struct platform_device *pdev, 332 332 const struct ufs_hba_variant_ops *vops)