2021-01-18 20:27:01

by Bean Huo

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Bean Huo <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

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);

--
2.17.1


2021-01-19 10:16:11

by Avri Altman

[permalink] [raw]
Subject: RE: [PATCH] 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.
>
> Signed-off-by: Bean Huo <[email protected]>
Reviewed-by: Avri Altman <[email protected]>

2021-01-21 06:37:37

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()


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

2021-01-23 04:25:51

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()

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