scsi: ufs: Delete ufshcd_read_desc()

Delete ufshcd_read_desc(). Instead, let caller directly call
ufshcd_read_desc_param().

Link: https://lore.kernel.org/r/20200603091959.27618-3-huobean@gmail.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bart van Assche <bvanassche@acm.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bean Huo 2020-06-03 11:19:56 +02:00 committed by Martin K. Petersen
parent 458a45f526
commit c4607a0945

View File

@ -3234,16 +3234,6 @@ out:
return ret;
}
static inline int ufshcd_read_desc(struct ufs_hba *hba,
enum desc_idn desc_id,
int desc_index,
void *buf,
u32 size)
{
return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size);
}
/**
* struct uc_string_id - unicode string
*
@ -3291,9 +3281,8 @@ int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
if (!uc_str)
return -ENOMEM;
ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_STRING,
desc_index, uc_str,
QUERY_DESC_MAX_SIZE);
ret = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_STRING, desc_index, 0,
(u8 *)uc_str, QUERY_DESC_MAX_SIZE);
if (ret < 0) {
dev_err(hba->dev, "Reading String Desc failed after %d retries. err = %d\n",
QUERY_REQ_RETRIES, ret);
@ -6813,8 +6802,8 @@ static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
if (!desc_buf)
return;
ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0,
desc_buf, buff_len);
ret = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_POWER, 0, 0,
desc_buf, buff_len);
if (ret) {
dev_err(hba->dev,
"%s: Failed reading power descriptor.len = %d ret = %d",
@ -7015,8 +7004,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
goto out;
}
err = ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, desc_buf,
hba->desc_size.dev_desc);
err = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_DEVICE, 0, 0, desc_buf,
hba->desc_size.dev_desc);
if (err) {
dev_err(hba->dev, "%s: Failed reading Device Desc. err = %d\n",
__func__, err);
@ -7298,8 +7287,8 @@ static int ufshcd_device_geo_params_init(struct ufs_hba *hba)
goto out;
}
err = ufshcd_read_desc(hba, QUERY_DESC_IDN_GEOMETRY, 0,
desc_buf, buff_len);
err = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_GEOMETRY, 0, 0,
desc_buf, buff_len);
if (err) {
dev_err(hba->dev, "%s: Failed reading Geometry Desc. err = %d\n",
__func__, err);