summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-04-19 15:58:11 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-25 23:23:04 -0400
commita8b032b5b3ba4e9d8ecb913724d0725121445b24 (patch)
treefe2a80ba4398f80968d1131598c79962f5213fab /drivers/scsi/ufs/ufs.h
parent743b09d8541e2d6ae419bf41c4815f8be318dcc5 (diff)
scsi: ufs: Move the ufs_is_valid_unit_desc_lun() definition
Move the definition of this function from a public into a private header file since it is only used inside the UFS core. Link: https://lore.kernel.org/r/20220419225811.4127248-29-bvanassche@acm.org Tested-by: Bean Huo <beanhuo@micron.com> Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs.h')
-rw-r--r--drivers/scsi/ufs/ufs.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index f52173b8ad96..1bba3fead2ce 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -620,23 +620,4 @@ enum ufs_trace_tsf_t {
UFS_TSF_CDB, UFS_TSF_OSF, UFS_TSF_TM_INPUT, UFS_TSF_TM_OUTPUT
};
-/**
- * ufs_is_valid_unit_desc_lun - checks if the given LUN has a unit descriptor
- * @dev_info: pointer of instance of struct ufs_dev_info
- * @lun: LU number to check
- * @return: true if the lun has a matching unit descriptor, false otherwise
- */
-static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info,
- u8 lun, u8 param_offset)
-{
- if (!dev_info || !dev_info->max_lu_supported) {
- pr_err("Max General LU supported by UFS isn't initialized\n");
- return false;
- }
- /* WB is available only for the logical unit from 0 to 7 */
- if (param_offset == UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS)
- return lun < UFS_UPIU_MAX_WB_LUN_ID;
- return lun == UFS_UPIU_RPMB_WLUN || (lun < dev_info->max_lu_supported);
-}
-
#endif /* End of Header */