Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Louis-Alexis Eyraud" <louisalexis.eyraud@collabora.com>
Cc: devicetree@vger.kernel.org, linux-scsi@vger.kernel.org,
	neil.armstrong@linaro.org, robh@kernel.org, conor+dt@kernel.org,
	vkoul@kernel.org, linux-phy@lists.infradead.org,
	olteanv@gmail.com
Subject: Re: [PATCH v13 19/24] scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice
Date: Thu, 01 Oct 2026 08:30:29 +0000	[thread overview]
Message-ID: <20261001083030.339681F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261001-mt8196-ufs-v13-19-60854adab6d9@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] ufs: mediatek: missing dev_err_probe() causes probe deferral log spam
--

commit d793732f4bb7b06145e7bd2323a3d21f956e829a
Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice

The ufs-mediatek driver needs to manage an optional dvfsrc-vcore regulator
but currently acquires two different references to it in different places.
This commit centralizes the reg_vcore acquisition in the host struct and
reworks the regulator users to eliminate the duplicated logic.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>

> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index ca31f07d382b4..d14192dc3e31c 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
[ ... ]
> @@ -1106,6 +1091,17 @@ static int ufs_mtk_get_supplies(struct ufs_mtk_host *host)
>  	const struct ufs_mtk_soc_data *data = of_device_get_match_data(dev);
>  	int ret;
>  
> +	host->reg_vcore = devm_regulator_get_optional(dev, "dvfsrc-vcore");
> +	if (IS_ERR(host->reg_vcore)) {
> +		if (PTR_ERR(host->reg_vcore) != -ENODEV) {
> +			dev_err(dev, "Failed to get dvfsrc-vcore supply: %pe\n",
> +				host->reg_vcore);

[Severity: Low]
Since devm_regulator_get_optional() can return -EPROBE_DEFER, will using
dev_err() here cause spurious error logs in dmesg every time the probe is
deferred?

Could this be changed to dev_err_probe() to quietly handle the -EPROBE_DEFER
case while properly logging real errors?

> +			return PTR_ERR(host->reg_vcore);
> +		}
> +
> +		host->reg_vcore = NULL;
> +	}
> +
>  	if (!data)
>  		return 0;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-mt8196-ufs-v13-0-60854adab6d9@collabora.com?part=19

  reply	other threads:[~2026-10-01  8:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01  8:21 [PATCH v13 00/24] MediaTek UFS Cleanup and MT8196 Enablement Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 01/24] dt-bindings: phy: Add mediatek,mt8196-ufsphy variant Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 02/24] dt-bindings: ufs: mediatek,ufs: Complete the binding Louis-Alexis Eyraud
2026-10-01  8:38   ` sashiko-bot
2026-10-01  8:21 ` [PATCH v13 03/24] dt-bindings: ufs: mediatek,ufs: Add mt8196 variant Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 04/24] scsi: ufs: mediatek: Move MTK_SIP_UFS_CONTROL to mtk_sip_svc.h Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 05/24] phy: mediatek: ufs: Add support for resets Louis-Alexis Eyraud
2026-10-01  8:38   ` sashiko-bot
2026-10-01  8:21 ` [PATCH v13 06/24] scsi: ufs: mediatek: Rework resets Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 07/24] scsi: ufs: mediatek: Rework 0.9V regulator Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 08/24] scsi: ufs: mediatek: Add dual 0.9V supply support Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 09/24] scsi: ufs: mediatek: Rework init function Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 10/24] scsi: ufs: mediatek: Rework the crypt-boost stuff Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 11/24] scsi: ufs: mediatek: Handle misc host voltage regulators Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 12/24] scsi: ufs: mediatek: Remove undocumented downstream reset cruft Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 13/24] scsi: ufs: mediatek: Remove vendor kernel quirks cruft Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 14/24] scsi: ufs: mediatek: Use the common PHY framework Louis-Alexis Eyraud
2026-10-01  8:33   ` sashiko-bot
2026-10-01  8:21 ` [PATCH v13 15/24] scsi: ufs: mediatek: Remove mediatek,ufs-broken-rtc property Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 16/24] scsi: ufs: mediatek: Rework _ufs_mtk_clk_scale error paths Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 17/24] scsi: ufs: mediatek: Clean up logging prints Louis-Alexis Eyraud
2026-10-01  8:32   ` sashiko-bot
2026-10-01  8:21 ` [PATCH v13 18/24] scsi: ufs: mediatek: Rework ufs_mtk_wait_idle_state Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 19/24] scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice Louis-Alexis Eyraud
2026-10-01  8:30   ` sashiko-bot [this message]
2026-10-01  8:21 ` [PATCH v13 20/24] scsi: ufs: mediatek: Rework hardware version reading Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 21/24] scsi: ufs: mediatek: Back up idle timer in per-instance struct Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 22/24] scsi: ufs: mediatek: Remove ret local from link_startup_notify Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 23/24] scsi: ufs: mediatek: Remove undocumented "clk-scale-up-vcore-min" Louis-Alexis Eyraud
2026-10-01  8:21 ` [PATCH v13 24/24] scsi: ufs: mediatek: Add MT8196 compatible, update copyright Louis-Alexis Eyraud

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=20261001083030.339681F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=louisalexis.eyraud@collabora.com \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox