[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32de5877a1fc6da9e0b23936d83ad956@codeaurora.org>
Date: Wed, 30 Oct 2019 20:43:29 +0800
From: cang@...eaurora.org
To: "Bean Huo (beanhuo)" <beanhuo@...ron.com>
Cc: 'Alim Akhtar' <alim.akhtar@...sung.com>,
'Avri Altman' <avri.altman@....com>,
'Pedro Sousa' <pedrom.sousa@...opsys.com>,
"'Martin K. Petersen'" <martin.petersen@...cle.com>,
"'James E.J. Bottomley'" <jejb@...ux.ibm.com>,
'Evan Green' <evgreen@...omium.org>,
'Stanley Chu' <stanley.chu@...iatek.com>,
"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'linux-scsi@...r.kernel.org'" <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH v1] scsi: ufs: delete redundant function
ufshcd_def_desc_sizes()
On 2019-10-29 22:22, Bean Huo (beanhuo) wrote:
> From: Bean Huo <beanhuo@...ron.com>
>
> There is no need to call ufshcd_def_desc_sizes() in ufshcd_init(),
> since descriptor lengths will be checked and initialized later in
> ufshcd_init_desc_sizes().
>
> Fixes: a4b0e8a4e92b1b(scsi: ufs: Factor out ufshcd_read_desc_param)
> Signed-off-by: Bean Huo <beanhuo@...ron.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index c28c144d9b4a..21a7244882a1 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6778,23 +6778,13 @@ static void ufshcd_init_desc_sizes(struct
> ufs_hba *hba)
> &hba->desc_size.geom_desc);
> if (err)
> hba->desc_size.geom_desc = QUERY_DESC_GEOMETRY_DEF_SIZE;
> +
> err = ufshcd_read_desc_length(hba, QUERY_DESC_IDN_HEALTH, 0,
> &hba->desc_size.hlth_desc);
> if (err)
> hba->desc_size.hlth_desc = QUERY_DESC_HEALTH_DEF_SIZE;
> }
>
> -static void ufshcd_def_desc_sizes(struct ufs_hba *hba)
> -{
> - hba->desc_size.dev_desc = QUERY_DESC_DEVICE_DEF_SIZE;
> - hba->desc_size.pwr_desc = QUERY_DESC_POWER_DEF_SIZE;
> - hba->desc_size.interc_desc = QUERY_DESC_INTERCONNECT_DEF_SIZE;
> - hba->desc_size.conf_desc = QUERY_DESC_CONFIGURATION_DEF_SIZE;
> - hba->desc_size.unit_desc = QUERY_DESC_UNIT_DEF_SIZE;
> - hba->desc_size.geom_desc = QUERY_DESC_GEOMETRY_DEF_SIZE;
> - hba->desc_size.hlth_desc = QUERY_DESC_HEALTH_DEF_SIZE;
> -}
> -
> static struct ufs_ref_clk ufs_ref_clk_freqs[] = {
> {19200000, REF_CLK_FREQ_19_2_MHZ},
> {26000000, REF_CLK_FREQ_26_MHZ},
> @@ -8283,9 +8273,6 @@ int ufshcd_init(struct ufs_hba *hba, void
> __iomem *mmio_base, unsigned int irq)
> hba->mmio_base = mmio_base;
> hba->irq = irq;
>
> - /* Set descriptor lengths to specification defaults */
> - ufshcd_def_desc_sizes(hba);
> -
> err = ufshcd_hba_init(hba);
> if (err)
> goto out_error;
Reviewed-by: Can Guo <cang@...eaurora.org>
Best regards
Can Guo
Powered by blists - more mailing lists