diff mbox series

[v5,07/10] scsi: ufs: Move the "hba->mcq_enabled = true" assignment

Message ID 20240708211716.2827751-8-bvanassche@acm.org (mailing list archive)
State Accepted
Headers show
Series UFS patches for kernel 6.11 | expand

Commit Message

Bart Van Assche July 8, 2024, 9:16 p.m. UTC
Move the "hba->mcq_enabled = true" assignment to prevent that it gets
duplicated by a later patch that will introduce more ufshcd_mcq_enable() calls.
No functionality is changed by this patch.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufs-mcq.c | 1 +
 drivers/ufs/core/ufshcd.c  | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Manivannan Sadhasivam July 9, 2024, 5:07 a.m. UTC | #1
On Mon, Jul 08, 2024 at 02:16:02PM -0700, Bart Van Assche wrote:
> Move the "hba->mcq_enabled = true" assignment to prevent that it gets
> duplicated by a later patch that will introduce more ufshcd_mcq_enable() calls.
> No functionality is changed by this patch.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  drivers/ufs/core/ufs-mcq.c | 1 +
>  drivers/ufs/core/ufshcd.c  | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> index 4bcae410c268..0a9597a6d059 100644
> --- a/drivers/ufs/core/ufs-mcq.c
> +++ b/drivers/ufs/core/ufs-mcq.c
> @@ -416,6 +416,7 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_enable_esi);
>  void ufshcd_mcq_enable(struct ufs_hba *hba)
>  {
>  	ufshcd_rmwl(hba, MCQ_MODE_SELECT, MCQ_MODE_SELECT, REG_UFS_MEM_CFG);
> +	hba->mcq_enabled = true;
>  }
>  EXPORT_SYMBOL_GPL(ufshcd_mcq_enable);
>  
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 255d55e15b73..7647d8969001 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8704,7 +8704,6 @@ static void ufshcd_config_mcq(struct ufs_hba *hba)
>  	ufshcd_mcq_config_mac(hba, hba->nutrs);
>  
>  	ufshcd_mcq_enable(hba);
> -	hba->mcq_enabled = true;
>  
>  	dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n",
>  		 hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT],
Peter Wang (王信友) July 15, 2024, 12:32 p.m. UTC | #2
On Mon, 2024-07-08 at 14:16 -0700, Bart Van Assche wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Move the "hba->mcq_enabled = true" assignment to prevent that it
> gets
> duplicated by a later patch that will introduce more
> ufshcd_mcq_enable() calls.
> No functionality is changed by this patch.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/ufs/core/ufs-mcq.c | 1 +
>  drivers/ufs/core/ufshcd.c  | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Peter Wang <peter.wang@mediatek.com>
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
index 4bcae410c268..0a9597a6d059 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -416,6 +416,7 @@  EXPORT_SYMBOL_GPL(ufshcd_mcq_enable_esi);
 void ufshcd_mcq_enable(struct ufs_hba *hba)
 {
 	ufshcd_rmwl(hba, MCQ_MODE_SELECT, MCQ_MODE_SELECT, REG_UFS_MEM_CFG);
+	hba->mcq_enabled = true;
 }
 EXPORT_SYMBOL_GPL(ufshcd_mcq_enable);
 
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 255d55e15b73..7647d8969001 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -8704,7 +8704,6 @@  static void ufshcd_config_mcq(struct ufs_hba *hba)
 	ufshcd_mcq_config_mac(hba, hba->nutrs);
 
 	ufshcd_mcq_enable(hba);
-	hba->mcq_enabled = true;
 
 	dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n",
 		 hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT],