From: Ulf Hansson <ulf.hansson@linaro.org>
To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Ricky Wu <ricky_wu@realtek.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] mmc: rtsx_usb_sdmmc: Convert sd_set_power_mode() into void
Date: Tue, 10 Jun 2025 13:16:25 +0200 [thread overview]
Message-ID: <20250610111633.504366-4-ulf.hansson@linaro.org> (raw)
In-Reply-To: <20250610111633.504366-1-ulf.hansson@linaro.org>
The sdmmc_set_ios() is the only caller of sd_set_power_mode() and it
ignores the return code. Let's therefore convert sd_set_power_mode() into a
void function instead.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index c204cdeaee3e..af45bac019d2 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1010,7 +1010,7 @@ static int sd_power_off(struct rtsx_usb_sdmmc *host)
return sd_pull_ctl_disable_qfn24(ucr);
}
-static int sd_set_power_mode(struct rtsx_usb_sdmmc *host,
+static void sd_set_power_mode(struct rtsx_usb_sdmmc *host,
unsigned char power_mode)
{
int err;
@@ -1019,7 +1019,7 @@ static int sd_set_power_mode(struct rtsx_usb_sdmmc *host,
power_mode = MMC_POWER_ON;
if (power_mode == host->power_mode)
- return 0;
+ return;
if (power_mode == MMC_POWER_OFF) {
err = sd_power_off(host);
@@ -1034,7 +1034,6 @@ static int sd_set_power_mode(struct rtsx_usb_sdmmc *host,
}
host->power_mode = power_mode;
- return err;
}
static int sd_set_timing(struct rtsx_usb_sdmmc *host,
--
2.43.0
next prev parent reply other threads:[~2025-06-10 11:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 11:16 [PATCH 0/4] mmc: rtsx_usb_sdmmc: Improve sd_set_power_mode() Ulf Hansson
2025-06-10 11:16 ` [PATCH 1/4] mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode() Ulf Hansson
2025-06-10 11:16 ` [PATCH 2/4] mmc: rtsx_usb_sdmmc: Print debug-messages at power-on/off errors Ulf Hansson
2025-06-10 11:16 ` Ulf Hansson [this message]
2025-06-10 11:16 ` [PATCH 4/4] mmc: rtsx_usb_sdmmc: Re-work the code in sd_set_power_mode() Ulf Hansson
2025-06-10 11:40 ` [PATCH 0/4] mmc: rtsx_usb_sdmmc: Improve sd_set_power_mode() Avri Altman
2025-06-17 13:56 ` Ulf Hansson
2025-06-18 2:48 ` Ricky WU
2025-06-19 2:27 ` Ricky WU
2025-06-19 11:20 ` Ulf Hansson
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=20250610111633.504366-4-ulf.hansson@linaro.org \
--to=ulf.hansson@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ricky_wu@realtek.com \
/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