From: Adrian Hunter <adrian.hunter@intel.com>
To: Shawn Lin <shawn.lin@rock-chips.com>, Ulf Hansson <ulfh@kernel.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH 1/2] mmc: sdhci-msm: Initialize the local ios in msm_toggle_vqmmc()
Date: Tue, 6 Oct 2026 08:58:14 +0300 [thread overview]
Message-ID: <6748e0f0-a098-46a7-ba16-af82f07a2739@intel.com> (raw)
In-Reply-To: <1790742751-245571-2-git-send-email-shawn.lin@rock-chips.com>
On 30/09/2026 07:32, Shawn Lin wrote:
> msm_toggle_vqmmc() builds a local struct mmc_ios and only initializes
> its signal_voltage, leaving vdd and the other members uninitialized
> when passing it to mmc_regulator_set_vqmmc(). It happens to work
> because the function only looks at signal_voltage today, but the next
> patch makes mmc_regulator_set_vqmmc() honor ios->vdd when calculating
> the 3.3V voltage range, which would read the uninitialized member.
>
> Start the local ios from mmc->ios so that all members are valid.
>
> Cc: linux-arm-msm@vger.kernel.org
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>
> drivers/mmc/host/sdhci-msm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index aecd425..32b1bcb 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1490,7 +1490,7 @@ static int msm_toggle_vqmmc(struct sdhci_msm_host *msm_host,
> struct mmc_host *mmc, bool level)
> {
> int ret;
> - struct mmc_ios ios;
> + struct mmc_ios ios = mmc->ios;
>
> if (msm_host->vqmmc_enabled == level)
> return 0;
next prev parent reply other threads:[~2026-10-06 5:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 4:32 [PATCH 0/2] Let mmc_regulator_set_vqmmc() use ios->vdd to set vqmmc Shawn Lin
2026-09-30 4:32 ` [PATCH 1/2] mmc: sdhci-msm: Initialize the local ios in msm_toggle_vqmmc() Shawn Lin
2026-10-06 5:58 ` Adrian Hunter [this message]
2026-09-30 4:32 ` [PATCH 2/2] mmc: core: Use the ios vdd when calculating vqmmc for 3.3V signaling Shawn Lin
2026-10-06 5:58 ` Adrian Hunter
2026-09-30 9:40 ` [PATCH 0/2] Let mmc_regulator_set_vqmmc() use ios->vdd to set vqmmc Ulf Hansson
2026-09-30 14:46 ` Shawn Lin
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=6748e0f0-a098-46a7-ba16-af82f07a2739@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulfh@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
all inboxes | Powered by JetHome®