From: Bart Van Assche Date: Fri, 15 Aug 2025 15:58:24 +0000 (-0700) Subject: scsi: ufs: core: Remove WARN_ON_ONCE() call from ufshcd_uic_cmd_compl() X-Git-Tag: v6.16.4~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0cc24c139e0f62859dbf88e050ba074cd93988f;p=thirdparty%2Fkernel%2Fstable.git scsi: ufs: core: Remove WARN_ON_ONCE() call from ufshcd_uic_cmd_compl() [ Upstream commit e5203d89d59bfcbe1f348aa0d2dc4449a8ba644c ] The UIC completion interrupt may be disabled while an UIC command is being processed. When the UIC completion interrupt is reenabled, an UIC interrupt is triggered and the WARN_ON_ONCE(!cmd) statement is hit. Hence this patch that removes this kernel warning. Fixes: fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze") Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250815155842.472867-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index f2eeb82ffa9b4..5224a21454021 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5533,7 +5533,7 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status) guard(spinlock_irqsave)(hba->host->host_lock); cmd = hba->active_uic_cmd; - if (WARN_ON_ONCE(!cmd)) + if (!cmd) goto unlock; if (ufshcd_is_auto_hibern8_error(hba, intr_status))