Skip to contentSkip to conversation

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

PATCH Applied Bean Huo 3 participants 4 messages Jan 18, 2021 – Jan 23, 2021 SCSI

lore
Share & tools
lore

Bean Huo

author
#0 lore raw

PATCH 1/1 scsi: ufs: delete redundant if statement in ufshcd_intr()

From: Bean Huo <[email protected]>

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

---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/ufs/ufshcd.c +1 -2
index 9b387d6a2a25..5c6ee9394af3 100644
@@ -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);
 
Signature · 1 line
2.17.1
#2 lore raw
In reply to Bean Huo

Bean,

Quoted 2 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering