diff mbox series

scsi: ufs: delete redundant if statement in ufshcd_intr()

Message ID 20210118201233.3043-1-huobean@gmail.com
State New
Headers show
Series scsi: ufs: delete redundant if statement in ufshcd_intr() | expand

Commit Message

Bean Huo Jan. 18, 2021, 8:12 p.m. UTC
From: Bean Huo <beanhuo@micron.com>

Once going into while-do loop, intr_status is already true,
this if-statement is redundant, remove it.

Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Avri Altman Jan. 19, 2021, 9:28 a.m. UTC | #1
> 

> 

> From: Bean Huo <beanhuo@micron.com>

> 

> Once going into while-do loop, intr_status is already true,

> this if-statement is redundant, remove it.

> 

> Signed-off-by: Bean Huo <beanhuo@micron.com>

Reviewed-by: Avri Altman <avri.altman@wdc.com>
Martin K. Petersen Jan. 21, 2021, 2:45 a.m. UTC | #2
Bean,

> Once going into while-do loop, intr_status is already true, this

> if-statement is redundant, remove it.


Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Jan. 23, 2021, 4:22 a.m. UTC | #3
On Mon, 18 Jan 2021 21:12:33 +0100, Bean Huo wrote:

> Once going into while-do loop, intr_status is already true,

> this if-statement is redundant, remove it.


Applied to 5.12/scsi-queue, thanks!

[1/1] scsi: ufs: delete redundant if statement in ufshcd_intr()
      https://git.kernel.org/mkp/scsi/c/60ec37555d05

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 9b387d6a2a25..5c6ee9394af3 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6317,8 +6317,7 @@  static irqreturn_t ufshcd_intr(int irq, void *__hba)
 	while (intr_status && retries--) {
 		enabled_intr_status =
 			intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
-		if (intr_status)
-			ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
+		ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
 		if (enabled_intr_status)
 			retval |= ufshcd_sl_intr(hba, enabled_intr_status);