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

scsi: ufs: Fix kernel-doc errors and warnings

Avoid that the kernel-doc tool complains about mismatches between
kernel-doc headers and function definitions. Avoid that errors like the
following are reported when building the UFS driver with W=1:

drivers/scsi/ufs/tc-dwc-g210-pci.c:60: error: Cannot parse struct or union!
drivers/scsi/ufs/tc-dwc-g210-pltfrm.c:26: warning: cannot understand function prototype: 'struct ufs_hba_variant_ops tc_dwc_g210_20bit_pltfm_hba_vops = '

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
8aa29f19 e0b14a4a

+52 -55
+2 -2
drivers/scsi/ufs/tc-dwc-g210-pci.c
··· 51 51 return ufshcd_runtime_idle(dev_get_drvdata(dev)); 52 52 } 53 53 54 - /** 54 + /* 55 55 * struct ufs_hba_dwc_vops - UFS DWC specific variant operations 56 56 */ 57 57 static struct ufs_hba_variant_ops tc_dwc_g210_pci_hba_vops = { ··· 71 71 /** 72 72 * tc_dwc_g210_pci_remove - de-allocate PCI/SCSI host and host memory space 73 73 * data structure memory 74 - * @pdev - pointer to PCI handle 74 + * @pdev: pointer to PCI handle 75 75 */ 76 76 static void tc_dwc_g210_pci_remove(struct pci_dev *pdev) 77 77 {
+1 -1
drivers/scsi/ufs/tc-dwc-g210-pltfrm.c
··· 20 20 #include "ufshcd-dwc.h" 21 21 #include "tc-dwc-g210.h" 22 22 23 - /** 23 + /* 24 24 * UFS DWC specific variant operations 25 25 */ 26 26 static struct ufs_hba_variant_ops tc_dwc_g210_20bit_pltfm_hba_vops = {
+3 -4
drivers/scsi/ufs/ufshcd-pci.c
··· 75 75 #ifdef CONFIG_PM_SLEEP 76 76 /** 77 77 * ufshcd_pci_suspend - suspend power management function 78 - * @pdev: pointer to PCI device handle 79 - * @state: power state 78 + * @dev: pointer to PCI device handle 80 79 * 81 80 * Returns 0 if successful 82 81 * Returns non-zero otherwise ··· 87 88 88 89 /** 89 90 * ufshcd_pci_resume - resume power management function 90 - * @pdev: pointer to PCI device handle 91 + * @dev: pointer to PCI device handle 91 92 * 92 93 * Returns 0 if successful 93 94 * Returns non-zero otherwise ··· 125 126 /** 126 127 * ufshcd_pci_remove - de-allocate PCI/SCSI host and host memory space 127 128 * data structure memory 128 - * @pdev - pointer to PCI handle 129 + * @pdev: pointer to PCI handle 129 130 */ 130 131 static void ufshcd_pci_remove(struct pci_dev *pdev) 131 132 {
+46 -48
drivers/scsi/ufs/ufshcd.c
··· 524 524 525 525 /** 526 526 * ufshcd_get_intr_mask - Get the interrupt bit mask 527 - * @hba - Pointer to adapter instance 527 + * @hba: Pointer to adapter instance 528 528 * 529 529 * Returns interrupt bit mask per version 530 530 */ ··· 551 551 552 552 /** 553 553 * ufshcd_get_ufs_version - Get the UFS version supported by the HBA 554 - * @hba - Pointer to adapter instance 554 + * @hba: Pointer to adapter instance 555 555 * 556 556 * Returns UFSHCI version supported by the controller 557 557 */ ··· 578 578 579 579 /** 580 580 * ufshcd_get_tr_ocs - Get the UTRD Overall Command Status 581 - * @lrb: pointer to local command reference block 581 + * @lrbp: pointer to local command reference block 582 582 * 583 583 * This function is used to get the OCS field from UTRD 584 584 * Returns the OCS field in the UTRD ··· 1738 1738 1739 1739 /** 1740 1740 * ufshcd_copy_sense_data - Copy sense data in case of check condition 1741 - * @lrb - pointer to local reference block 1741 + * @lrbp: pointer to local reference block 1742 1742 */ 1743 1743 static inline void ufshcd_copy_sense_data(struct ufshcd_lrb *lrbp) 1744 1744 { ··· 1760 1760 * ufshcd_copy_query_response() - Copy the Query Response and the data 1761 1761 * descriptor 1762 1762 * @hba: per adapter instance 1763 - * @lrb - pointer to local reference block 1763 + * @lrbp: pointer to local reference block 1764 1764 */ 1765 1765 static 1766 1766 int ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) ··· 1861 1861 /** 1862 1862 * ufshcd_wait_for_uic_cmd - Wait complectioin of UIC command 1863 1863 * @hba: per adapter instance 1864 - * @uic_command: UIC command 1864 + * @uic_cmd: UIC command 1865 1865 * 1866 1866 * Must be called with mutex held. 1867 1867 * Returns 0 only if success. ··· 1944 1944 1945 1945 /** 1946 1946 * ufshcd_map_sg - Map scatter-gather list to prdt 1947 - * @lrbp - pointer to local reference block 1947 + * @hba: per adapter instance 1948 + * @lrbp: pointer to local reference block 1948 1949 * 1949 1950 * Returns 0 in case of success, non-zero value in case of failure 1950 1951 */ ··· 2081 2080 /** 2082 2081 * ufshcd_prepare_utp_scsi_cmd_upiu() - fills the utp_transfer_req_desc, 2083 2082 * for scsi commands 2084 - * @lrbp - local reference block pointer 2085 - * @upiu_flags - flags 2083 + * @lrbp: local reference block pointer 2084 + * @upiu_flags: flags 2086 2085 */ 2087 2086 static 2088 2087 void ufshcd_prepare_utp_scsi_cmd_upiu(struct ufshcd_lrb *lrbp, u32 upiu_flags) ··· 2170 2169 /** 2171 2170 * ufshcd_comp_devman_upiu - UFS Protocol Information Unit(UPIU) 2172 2171 * for Device Management Purposes 2173 - * @hba - per adapter instance 2174 - * @lrb - pointer to local reference block 2172 + * @hba: per adapter instance 2173 + * @lrbp: pointer to local reference block 2175 2174 */ 2176 2175 static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) 2177 2176 { ··· 2198 2197 /** 2199 2198 * ufshcd_comp_scsi_upiu - UFS Protocol Information Unit(UPIU) 2200 2199 * for SCSI Purposes 2201 - * @hba - per adapter instance 2202 - * @lrb - pointer to local reference block 2200 + * @hba: per adapter instance 2201 + * @lrbp: pointer to local reference block 2203 2202 */ 2204 2203 static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) 2205 2204 { ··· 2225 2224 2226 2225 /** 2227 2226 * ufshcd_upiu_wlun_to_scsi_wlun - maps UPIU W-LUN id to SCSI W-LUN ID 2228 - * @scsi_lun: UPIU W-LUN id 2227 + * @upiu_wlun_id: UPIU W-LUN id 2229 2228 * 2230 2229 * Returns SCSI W-LUN id 2231 2230 */ ··· 2236 2235 2237 2236 /** 2238 2237 * ufshcd_queuecommand - main entry point for SCSI requests 2238 + * @host: SCSI host pointer 2239 2239 * @cmd: command from SCSI Midlayer 2240 - * @done: call back function 2241 2240 * 2242 2241 * Returns 0 for success, non-zero in case of failure 2243 2242 */ ··· 2478 2477 /** 2479 2478 * ufshcd_get_dev_cmd_tag - Get device management command tag 2480 2479 * @hba: per-adapter instance 2481 - * @tag: pointer to variable with available slot value 2480 + * @tag_out: pointer to variable with available slot value 2482 2481 * 2483 2482 * Get a free slot and lock it until device management command 2484 2483 * completes. ··· 2515 2514 2516 2515 /** 2517 2516 * ufshcd_exec_dev_cmd - API for sending device management requests 2518 - * @hba - UFS hba 2519 - * @cmd_type - specifies the type (NOP, Query...) 2520 - * @timeout - time in seconds 2517 + * @hba: UFS hba 2518 + * @cmd_type: specifies the type (NOP, Query...) 2519 + * @timeout: time in seconds 2521 2520 * 2522 2521 * NOTE: Since there is only one available tag for device management commands, 2523 2522 * it is expected you hold the hba->dev_cmd.lock mutex. ··· 2614 2613 2615 2614 /** 2616 2615 * ufshcd_query_flag() - API function for sending flag query requests 2617 - * hba: per-adapter instance 2618 - * query_opcode: flag query to perform 2619 - * idn: flag idn to access 2620 - * flag_res: the flag value after the query request completes 2616 + * @hba: per-adapter instance 2617 + * @opcode: flag query to perform 2618 + * @idn: flag idn to access 2619 + * @flag_res: the flag value after the query request completes 2621 2620 * 2622 2621 * Returns 0 for success, non-zero in case of failure 2623 2622 */ ··· 2681 2680 2682 2681 /** 2683 2682 * ufshcd_query_attr - API function for sending attribute requests 2684 - * hba: per-adapter instance 2685 - * opcode: attribute opcode 2686 - * idn: attribute idn to access 2687 - * index: index field 2688 - * selector: selector field 2689 - * attr_val: the attribute value after the query request completes 2683 + * @hba: per-adapter instance 2684 + * @opcode: attribute opcode 2685 + * @idn: attribute idn to access 2686 + * @index: index field 2687 + * @selector: selector field 2688 + * @attr_val: the attribute value after the query request completes 2690 2689 * 2691 2690 * Returns 0 for success, non-zero in case of failure 2692 2691 */ ··· 2845 2844 } 2846 2845 2847 2846 /** 2848 - * ufshcd_query_descriptor_retry - API function for sending descriptor 2849 - * requests 2850 - * hba: per-adapter instance 2851 - * opcode: attribute opcode 2852 - * idn: attribute idn to access 2853 - * index: index field 2854 - * selector: selector field 2855 - * desc_buf: the buffer that contains the descriptor 2856 - * buf_len: length parameter passed to the device 2847 + * ufshcd_query_descriptor_retry - API function for sending descriptor requests 2848 + * @hba: per-adapter instance 2849 + * @opcode: attribute opcode 2850 + * @idn: attribute idn to access 2851 + * @index: index field 2852 + * @selector: selector field 2853 + * @desc_buf: the buffer that contains the descriptor 2854 + * @buf_len: length parameter passed to the device 2857 2855 * 2858 2856 * Returns 0 for success, non-zero in case of failure. 2859 2857 * The buf_len parameter will contain, on return, the length parameter ··· 3077 3077 * 3078 3078 * Return 0 in case of success, non-zero otherwise 3079 3079 */ 3080 - #define ASCII_STD true 3081 3080 int ufshcd_read_string_desc(struct ufs_hba *hba, int desc_index, 3082 3081 u8 *buf, u32 size, bool ascii) 3083 3082 { ··· 3878 3879 3879 3880 /** 3880 3881 * ufshcd_complete_dev_init() - checks device readiness 3881 - * hba: per-adapter instance 3882 + * @hba: per-adapter instance 3882 3883 * 3883 3884 * Set fDeviceInit flag and poll until device toggles it. 3884 3885 */ ··· 4417 4418 4418 4419 /** 4419 4420 * ufshcd_scsi_cmd_status - Update SCSI command result based on SCSI status 4420 - * @lrb: pointer to local reference block of completed command 4421 + * @lrbp: pointer to local reference block of completed command 4421 4422 * @scsi_status: SCSI command status 4422 4423 * 4423 4424 * Returns value base on SCSI command status ··· 4452 4453 /** 4453 4454 * ufshcd_transfer_rsp_status - Get overall status of the response 4454 4455 * @hba: per adapter instance 4455 - * @lrb: pointer to local reference block of completed command 4456 + * @lrbp: pointer to local reference block of completed command 4456 4457 * 4457 4458 * Returns result of the command to notify SCSI midlayer 4458 4459 */ ··· 5760 5761 5761 5762 /** 5762 5763 * ufshcd_eh_host_reset_handler - host reset handler registered to scsi layer 5763 - * @cmd - SCSI command pointer 5764 + * @cmd: SCSI command pointer 5764 5765 * 5765 5766 * Returns SUCCESS/FAILED 5766 5767 */ ··· 5945 5946 * will take effect only when its sent to "UFS device" well known logical unit 5946 5947 * hence we require the scsi_device instance to represent this logical unit in 5947 5948 * order for the UFS host driver to send the SSU command for power management. 5948 - 5949 + * 5949 5950 * We also require the scsi_device instance for "RPMB" (Replay Protected Memory 5950 5951 * Block) LU so user space process can control this LU. User space may also 5951 5952 * want to have access to BOOT LU. 5952 - 5953 + * 5953 5954 * This function adds scsi device instances for each of all well known LUs 5954 5955 * (except "REPORT LUNS" LU). 5955 5956 * ··· 6018 6019 model_index = desc_buf[DEVICE_DESC_PARAM_PRDCT_NAME]; 6019 6020 6020 6021 err = ufshcd_read_string_desc(hba, model_index, str_desc_buf, 6021 - QUERY_DESC_MAX_SIZE, ASCII_STD); 6022 + QUERY_DESC_MAX_SIZE, true/*ASCII*/); 6022 6023 if (err) { 6023 6024 dev_err(hba->dev, "%s: Failed reading Product Name. err = %d\n", 6024 6025 __func__, err); ··· 7412 7413 /** 7413 7414 * ufshcd_system_suspend - system suspend routine 7414 7415 * @hba: per adapter instance 7415 - * @pm_op: runtime PM or system PM 7416 7416 * 7417 7417 * Check the description of ufshcd_suspend() function for more details. 7418 7418 * ··· 7595 7597 /** 7596 7598 * ufshcd_remove - de-allocate SCSI host and host memory space 7597 7599 * data structure memory 7598 - * @hba - per adapter instance 7600 + * @hba: per adapter instance 7599 7601 */ 7600 7602 void ufshcd_remove(struct ufs_hba *hba) 7601 7603 {