mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 1/2] mmc: dw_mmc: Inline dw_mci_queue_request() into dw_mci_request()
Date: Tue, 31 Mar 2026 15:54:49 +0800	[thread overview]
Message-ID: <1774943690-219754-2-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1774943690-219754-1-git-send-email-shawn.lin@rock-chips.com>

With the removal of queue support, the function dw_mci_queue_request()
is now just a wrapper with a confusing name that doesn't suggest
anything about queue. Removes the function and moves its body into
dw_mci_request().

No functional changes intended.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/mmc/host/dw_mmc.c | 46 +++++++++++++++++++---------------------------
 1 file changed, 19 insertions(+), 27 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index bbdd759..8e78faf 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1293,31 +1293,6 @@ static void dw_mci_start_request(struct dw_mci *host)
 	__dw_mci_start_request(host, cmd);
 }
 
-/* must be called with host->lock held */
-static void dw_mci_queue_request(struct dw_mci *host, struct mmc_request *mrq)
-{
-	dev_vdbg(&host->mmc->class_dev, "queue request: state=%d\n",
-		 host->state);
-
-	host->mrq = mrq;
-
-	if (host->state == STATE_WAITING_CMD11_DONE) {
-		dev_warn(&host->mmc->class_dev,
-			 "Voltage change didn't complete\n");
-		/*
-		 * this case isn't expected to happen, so we can
-		 * either crash here or just try to continue on
-		 * in the closest possible state
-		 */
-		host->state = STATE_IDLE;
-	}
-
-	if (host->state == STATE_IDLE) {
-		host->state = STATE_SENDING_CMD;
-		dw_mci_start_request(host);
-	}
-}
-
 static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
 	struct dw_mci *host = mmc_priv(mmc);
@@ -1329,7 +1304,6 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 	 * atomic, otherwise the card could be removed in between and the
 	 * request wouldn't fail until another card was inserted.
 	 */
-
 	if (!dw_mci_get_cd(mmc)) {
 		mrq->cmd->error = -ENOMEDIUM;
 		mmc_request_done(mmc, mrq);
@@ -1338,7 +1312,25 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 
 	spin_lock_bh(&host->lock);
 
-	dw_mci_queue_request(host, mrq);
+	dev_vdbg(&host->mmc->class_dev, "request: state=%d\n",
+		 host->state);
+
+	host->mrq = mrq;
+	if (host->state == STATE_WAITING_CMD11_DONE) {
+		dev_warn(&host->mmc->class_dev,
+			 "Voltage change didn't complete\n");
+		/*
+		 * this case isn't expected to happen, so we can
+		 * either crash here or just try to continue on
+		 * in the closest possible state
+		 */
+		host->state = STATE_IDLE;
+	}
+
+	if (host->state == STATE_IDLE) {
+		host->state = STATE_SENDING_CMD;
+		dw_mci_start_request(host);
+	}
 
 	spin_unlock_bh(&host->lock);
 }
-- 
2.7.4


  reply	other threads:[~2026-03-31  7:55 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 ` Shawn Lin [this message]
2026-03-31  7:54 ` [PATCH 2/2] mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core function Shawn Lin
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-2-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®