From: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
To: Bean Huo <huobean@gmail.com>,
alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, stanley.chu@mediatek.com,
beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com,
cang@codeaurora.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/8] scsi: ufs: Inline two functions into their callers
Date: Mon, 20 Jan 2020 12:41:05 -0800 [thread overview]
Message-ID: <44e68000-a5b3-b368-d76f-416d412e1a87@codeaurora.org> (raw)
In-Reply-To: <20200120130820.1737-6-huobean@gmail.com>
On 1/20/2020 5:08 AM, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
>
> Delete ufshcd_read_power_desc() and ufshcd_read_device_desc(), directly
> inline ufshcd_read_desc() into its callers.
>
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
LGTM.
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> drivers/scsi/ufs/ufshcd.c | 17 ++++-------------
> 1 file changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 5dfe760f2786..3d3289bb3cad 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -3146,17 +3146,6 @@ static inline int ufshcd_read_desc(struct ufs_hba *hba,
> return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size);
> }
>
> -static inline int ufshcd_read_power_desc(struct ufs_hba *hba,
> - u8 *buf,
> - u32 size)
> -{
> - return ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0, buf, size);
> -}
> -
> -static int ufshcd_read_device_desc(struct ufs_hba *hba, u8 *buf, u32 size)
> -{
> - return ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, buf, size);
> -}
>
> /**
> * struct uc_string_id - unicode string
> @@ -6493,7 +6482,8 @@ static void ufshcd_init_icc_levels(struct ufs_hba *hba)
> if (!desc_buf)
> return;
>
> - ret = ufshcd_read_power_desc(hba, desc_buf, buff_len);
> + ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0,
> + desc_buf, buff_len);
> if (ret) {
> dev_err(hba->dev,
> "%s: Failed reading power descriptor.len = %d ret = %d",
> @@ -6599,7 +6589,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
> goto out;
> }
>
> - err = ufshcd_read_device_desc(hba, desc_buf, hba->desc_size.dev_desc);
> + err = ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, desc_buf,
> + hba->desc_size.dev_desc);
> if (err) {
> dev_err(hba->dev, "%s: Failed reading Device Desc. err = %d\n",
> __func__, err);
>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project
next prev parent reply other threads:[~2020-01-20 20:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 13:08 [PATCH v4 0/8] Use UFS device indicated maximum LU number Bean Huo
2020-01-20 13:08 ` [PATCH v4 1/8] scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails Bean Huo
2020-01-20 13:08 ` [PATCH v4 2/8] scsi: ufs: Delete struct ufs_dev_desc Bean Huo
2020-01-20 13:08 ` [PATCH v4 3/8] scsi: ufs: Split ufshcd_probe_hba() based on its called flow Bean Huo
2020-01-20 20:35 ` Asutosh Das (asd)
2020-01-20 13:08 ` [PATCH v4 4/8] scsi: ufs: Move ufshcd_get_max_pwr_mode() to ufshcd_device_params_init() Bean Huo
2020-01-20 20:39 ` Asutosh Das (asd)
2020-01-20 13:08 ` [PATCH v4 5/8] scsi: ufs: Inline two functions into their callers Bean Huo
2020-01-20 20:41 ` Asutosh Das (asd) [this message]
2020-01-22 5:08 ` Bart Van Assche
2020-01-20 13:08 ` [PATCH v4 6/8] scsi: ufs: Delete is_init_prefetch from struct ufs_hba Bean Huo
2020-01-20 20:43 ` Asutosh Das (asd)
2020-01-22 5:13 ` Bart Van Assche
2020-01-22 10:13 ` [EXT] " Bean Huo (beanhuo)
2020-01-20 13:08 ` [PATCH v4 7/8] scsi: ufs: Add max_lu_supported in struct ufs_dev_info Bean Huo
2020-01-20 13:08 ` [PATCH v4 8/8] scsi: ufs: Use UFS device indicated maximum LU number Bean Huo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44e68000-a5b3-b368-d76f-416d412e1a87@codeaurora.org \
--to=asutoshd@codeaurora.org \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=huobean@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox