From: sashiko-bot@kernel.org
To: "Rohan Joshi" <rohan1sj@cadence.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/2] mmc: sdhci-cadence: add CQE support
Date: Wed, 22 Jul 2026 11:00:12 +0000 [thread overview]
Message-ID: <20260722110012.947D61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722-cdns_sdhci_cqe-support-v3-2-4412856a4488@cadence.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] In `sdhci_cdns_resume()`, if `cqhci_resume()` were to fail, the error path fails to roll back the already-resumed SDHCI host.
--
--- Patch [2]: [PATCH v3 2/2] mmc: sdhci-cadence: add CQE support ---
commit 3bdb7a0ff9ae82cc040dd069fa74bd0366328e92
Author: Rohan Joshi <rohan1sj@cadence.com>
mmc: sdhci-cadence: add CQE support
This commit adds optional Command Queue Engine (CQE) support to the Cadence
SDHCI host controller driver. The presence of CQE is determined by an
additional host capability register and integrated into the host setup.
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
[ ... ]
> @@ -630,6 +739,13 @@ static int sdhci_cdns_resume(struct device *dev)
> ret = sdhci_resume_host(host);
> if (ret)
> goto disable_clk;
>
> + /* Resume CQE if enabled */
> + if (priv->cqe_support) {
> + ret = cqhci_resume(host->mmc);
> + if (ret)
> + goto disable_clk;
> + }
> +
> return 0;
>
> disable_clk:
> clk_disable_unprepare(pltfm_host->clk);
>
> return ret;
> }
[Severity: Low]
If cqhci_resume() fails, the code jumps to disable_clk, which disables the
clock but leaves the SDHCI host in a resumed state since sdhci_resume_host()
was already called successfully. Is it intentional to skip rolling back the
host resume here?
While cqhci_resume() unconditionally returns 0 today, making this error
path structurally impossible to execute at the moment, should this perhaps
call sdhci_suspend_host() on error to keep the power management state
balanced in case cqhci_resume() behavior changes in the future?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260722-cdns_sdhci_cqe-support-v3-0-4412856a4488@cadence.com?part=2
prev parent reply other threads:[~2026-07-22 11:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 10:48 [PATCH v3 0/2] CQE support for cadence eMMC host controller Rohan Joshi via B4 Relay
2026-07-22 10:48 ` Rohan Joshi
2026-07-22 10:48 ` [PATCH v3 1/2] dt-bindings: mmc: cdns,sdhci: Add CQE support Rohan Joshi via B4 Relay
2026-07-22 10:48 ` Rohan Joshi
2026-07-22 10:54 ` sashiko-bot
2026-07-22 16:37 ` Conor Dooley
2026-07-22 10:48 ` [PATCH v3 2/2] mmc: sdhci-cadence: add " Rohan Joshi via B4 Relay
2026-07-22 10:48 ` Rohan Joshi
2026-07-22 11:00 ` sashiko-bot [this message]
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=20260722110012.947D61F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rohan1sj@cadence.com \
--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.