* [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()
@ 2021-01-18 20:12 Bean Huo
2021-01-19 9:28 ` Avri Altman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bean Huo @ 2021-01-18 20:12 UTC (permalink / raw)
To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang
Cc: linux-scsi, linux-kernel
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(-)
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()
2021-01-18 20:12 [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr() Bean Huo
@ 2021-01-19 9:28 ` Avri Altman
2021-01-21 2:45 ` Martin K. Petersen
2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Avri Altman @ 2021-01-19 9:28 UTC (permalink / raw)
To: Bean Huo, alim.akhtar, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang
Cc: linux-scsi, linux-kernel
>
>
> 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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()
2021-01-18 20:12 [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr() Bean Huo
2021-01-19 9:28 ` Avri Altman
@ 2021-01-21 2:45 ` Martin K. Petersen
2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-01-21 2:45 UTC (permalink / raw)
To: Bean Huo
Cc: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang,
linux-scsi, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr()
2021-01-18 20:12 [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr() Bean Huo
2021-01-19 9:28 ` Avri Altman
2021-01-21 2:45 ` Martin K. Petersen
@ 2021-01-23 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-01-23 4:22 UTC (permalink / raw)
To: asutoshd, stanley.chu, Bean Huo, alim.akhtar, beanhuo, jejb,
bvanassche, tomas.winkler, cang, avri.altman
Cc: Martin K . Petersen, linux-kernel, linux-scsi
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-23 4:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 20:12 [PATCH] scsi: ufs: delete redundant if statement in ufshcd_intr() Bean Huo
2021-01-19 9:28 ` Avri Altman
2021-01-21 2:45 ` Martin K. Petersen
2021-01-23 4:22 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).