]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core function
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 31 Mar 2026 07:54:50 +0000 (15:54 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 31 Mar 2026 10:47:12 +0000 (12:47 +0200)
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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index 8e78faf6bb359626fcd5deab841ab2e7b4e1bd2d..20193ee7b73eb097d545e3e7a93ff9a896d43be2 100644 (file)
@@ -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;
                        }