diff mbox series

Unnecessary code change in spin_lock section.

Message ID 20210513023307.12435-1-cw9316.lee@samsung.com (mailing list archive)
State New, archived
Headers show
Series Unnecessary code change in spin_lock section. | expand

Commit Message

Chanwoo Lee May 13, 2021, 2:33 a.m. UTC
From: ChanWoo Lee <cw9316.lee@samsung.com>

This is the spin_lock section for cq_host, and mmc setting is unnecessary.

Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
---
 drivers/mmc/host/cqhci-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Adrian Hunter May 17, 2021, 11:34 a.m. UTC | #1
On 13/05/21 5:33 am, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.com>
> 
> This is the spin_lock section for cq_host, and mmc setting is unnecessary.
> 
> Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
> ---
>  drivers/mmc/host/cqhci-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
> index 93b0432bb601..4d76c858d45f 100644
> --- a/drivers/mmc/host/cqhci-core.c
> +++ b/drivers/mmc/host/cqhci-core.c
> @@ -1090,8 +1090,8 @@ static void cqhci_recovery_finish(struct mmc_host *mmc)
>  	spin_lock_irqsave(&cq_host->lock, flags);
>  	cq_host->qcnt = 0;
>  	cq_host->recovery_halt = false;
> -	mmc->cqe_on = false;
>  	spin_unlock_irqrestore(&cq_host->lock, flags);

No, we don't want anyone to see mmc->cqe_on == true and
cq_host->recovery_halt == false at this point.

> +	mmc->cqe_on = false;>  	/* Ensure all writes are done before interrupts are re-enabled */
>  	wmb();
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
index 93b0432bb601..4d76c858d45f 100644
--- a/drivers/mmc/host/cqhci-core.c
+++ b/drivers/mmc/host/cqhci-core.c
@@ -1090,8 +1090,8 @@  static void cqhci_recovery_finish(struct mmc_host *mmc)
 	spin_lock_irqsave(&cq_host->lock, flags);
 	cq_host->qcnt = 0;
 	cq_host->recovery_halt = false;
-	mmc->cqe_on = false;
 	spin_unlock_irqrestore(&cq_host->lock, flags);
+	mmc->cqe_on = false;
 
 	/* Ensure all writes are done before interrupts are re-enabled */
 	wmb();