From: Stanley Chu <stanley.chu@mediatek.com>
To: Can Guo <cang@codeaurora.org>
Cc: <asutoshd@codeaurora.org>, <nguyenb@codeaurora.org>,
<hongwus@codeaurora.org>, <rnayak@codeaurora.org>,
<linux-scsi@vger.kernel.org>, <kernel-team@android.com>,
<saravanak@google.com>, <salyzyn@google.com>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Bean Huo <beanhuo@micron.com>,
"Bart Van Assche" <bvanassche@acm.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] scsi: ufs: Clean up some lines from ufshcd_hba_exit()
Date: Wed, 9 Dec 2020 16:22:27 +0800 [thread overview]
Message-ID: <1607502147.3580.33.camel@mtkswgap22> (raw)
In-Reply-To: <1607497100-27570-3-git-send-email-cang@codeaurora.org>
Hi Can,
On Tue, 2020-12-08 at 22:58 -0800, Can Guo wrote:
> ufshcd_hba_exit() is always called after ufshcd_exit_clk_scaling() and
> ufshcd_exit_clk_gating(), so no need to suspend clock scaling again in
> ufshcd_hba_exit().
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
> ---
> drivers/scsi/ufs/ufshcd.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 12266bd..0a5b197 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7765,6 +7765,7 @@ static void ufshcd_async_scan(void *data, async_cookie_t cookie)
> if (ret) {
> pm_runtime_put_sync(hba->dev);
> ufshcd_exit_clk_scaling(hba);
> + ufshcd_exit_clk_gating(hba);
How about moving above two lines to ufshcd_hba_exit()?
Otherwise looks good to me!
Reviewed-by: Stanley Chu <stanleyc.chu@mediatek.com>
> ufshcd_hba_exit(hba);
> }
> }
> @@ -8203,10 +8204,6 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
> if (hba->is_powered) {
> ufshcd_variant_hba_exit(hba);
> ufshcd_setup_vreg(hba, false);
> - ufshcd_suspend_clkscaling(hba);
> - if (ufshcd_is_clkscaling_supported(hba))
> - if (hba->devfreq)
> - ufshcd_suspend_clkscaling(hba);
> ufshcd_setup_clocks(hba, false);
> ufshcd_setup_hba_vreg(hba, false);
> hba->is_powered = false;
next prev parent reply other threads:[~2020-12-09 8:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 6:58 [PATCH v1 0/2] Two changes related with UFS clock scaling Can Guo
2020-12-09 6:58 ` [PATCH v1 1/2] scsi: ufs: Protect some contexts from unexpected " Can Guo
2020-12-09 6:58 ` [PATCH v1 2/2] scsi: ufs: Clean up some lines from ufshcd_hba_exit() Can Guo
2020-12-09 8:22 ` Stanley Chu [this message]
2020-12-09 8:29 ` Can Guo
2020-12-09 22:17 ` Bean Huo
2020-12-10 0:49 ` Can Guo
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=1607502147.3580.33.camel@mtkswgap22 \
--to=stanley.chu@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=hongwus@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nguyenb@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=salyzyn@google.com \
--cc=saravanak@google.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