All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "HOYOUNG SEO" <hy50.seo@samsung.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
Date: Mon, 26 Oct 2026 09:23:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-184774@kernel.org> (raw)
In-Reply-To: <20261026052632.1848929-1-hy50.seo@samsung.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] scsi: ufs: unmatched opening brace in ufshcd_uic_cmd_compl()
--

commit 0662e042cc8b3241cb51d99b2a23b42e34c3390e
Author: HOYOUNG SEO <hy50.seo@samsung.com>

scsi: ufs: Change the error check sequence for auto hibern8

This commit moves the auto-hibern8 error check in ufshcd_uic_cmd_compl()
ahead of the active UIC command NULL check so that auto-hibern8 errors are
recorded in hba->errors even when no UIC command is active. It also avoids
logging an error for a missing UIC command when an auto-hibern8 error is
detected.

> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index cc75384c65021..1dd9fbf2e696c 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5928,16 +5928,22 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)
>  	struct uic_command *cmd;
>  
>  	guard(spinlock_irqsave)(&hba->host->host_lock);
> +
> +	/*
> +	 * Auto-hibern8 is performed without a UIC command, so check for
> +	 * auto-hibern8 errors before checking for an active UIC command.
> +	 */
> +	if (ufshcd_is_auto_hibern8_error(hba, intr_status)) {
> +		hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
> +
>  	cmd = hba->active_uic_cmd;

[Severity: High]
In ufshcd_uic_cmd_compl() in drivers/ufs/core/ufshcd.c, the
if (ufshcd_is_auto_hibern8_error(hba, intr_status)) statement opens a brace
without a matching closing brace before cmd = hba->active_uic_cmd.

Because the block is never closed, the remainder of ufshcd_uic_cmd_compl() is
enclosed inside the conditional and the final brace of ufshcd_uic_cmd_compl()
closes the if statement rather than the function body, breaking compilation
when building drivers/ufs/core/ufshcd.c.

Should the opening brace on the if statement be removed (or closed with a
matching brace)?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261026052632.1848929-1-hy50.seo@samsung.com?part=1

  reply	other threads:[~2026-10-26  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261026053046epcas2p31ae8a493f40c0f12523feec6e036072f@epcas2p3.samsung.com>
2026-10-26  5:26 ` [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
2026-10-26  9:23   ` sashiko-bot [this message]
2026-10-26 14:42   ` Stanley Jhu
2026-10-26 15:34     ` Bart Van Assche
2026-10-26 17:44   ` kernel test robot
2026-10-26 18:44   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-184774@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=hy50.seo@samsung.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.