From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Jaehoon Chung <jh80.chung@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH 2/2] mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core function
Date: Tue, 31 Mar 2026 15:54:50 +0800 [thread overview]
Message-ID: <1774943690-219754-3-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1774943690-219754-1-git-send-email-shawn.lin@rock-chips.com>
The function dw_mci_start_request() was just a thin wrapper around
__dw_mci_start_request(). Since it serves almost no functional purpose,
remove the wrapper to simplify the code flow.
Consequently, rename __dw_mci_start_request() to dw_mci_start_request()
so that the core implementation uses the primary name.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/host/dw_mmc.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 8e78faf..20193ee 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1224,8 +1224,7 @@ static void dw_mci_set_data_timeout(struct dw_mci *host,
timeout_ns, tmout >> 8);
}
-static void __dw_mci_start_request(struct dw_mci *host,
- struct mmc_command *cmd)
+static void dw_mci_start_request(struct dw_mci *host, struct mmc_command *cmd)
{
struct mmc_request *mrq;
struct mmc_data *data;
@@ -1284,18 +1283,10 @@ static void __dw_mci_start_request(struct dw_mci *host,
host->stop_cmdr = dw_mci_prep_stop_abort(host, cmd);
}
-static void dw_mci_start_request(struct dw_mci *host)
-{
- struct mmc_request *mrq = host->mrq;
- struct mmc_command *cmd;
-
- cmd = mrq->sbc ? mrq->sbc : mrq->cmd;
- __dw_mci_start_request(host, cmd);
-}
-
static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct dw_mci *host = mmc_priv(mmc);
+ struct mmc_command *cmd;
WARN_ON(host->mrq);
@@ -1329,7 +1320,8 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
if (host->state == STATE_IDLE) {
host->state = STATE_SENDING_CMD;
- dw_mci_start_request(host);
+ cmd = mrq->sbc ? mrq->sbc : mrq->cmd;
+ dw_mci_start_request(host, cmd);
}
spin_unlock_bh(&host->lock);
@@ -1949,7 +1941,7 @@ static void dw_mci_work_func(struct work_struct *t)
set_bit(EVENT_CMD_COMPLETE, &host->completed_events);
err = dw_mci_command_complete(host, cmd);
if (cmd == mrq->sbc && !err) {
- __dw_mci_start_request(host, mrq->cmd);
+ dw_mci_start_request(host, mrq->cmd);
goto unlock;
}
--
2.7.4
next prev parent reply other threads:[~2026-03-31 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 7:54 [PATCH 0/2] Improve request handling code flow and clarify function naming for dw_mmc Shawn Lin
2026-03-31 7:54 ` [PATCH 1/2] mmc: dw_mmc: Inline dw_mci_queue_request() into dw_mci_request() Shawn Lin
2026-03-31 7:54 ` Shawn Lin [this message]
2026-03-31 11:14 ` [PATCH 0/2] Improve request handling code flow and clarify function naming for dw_mmc 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=1774943690-219754-3-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=jh80.chung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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®