]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: dw_mmc: Remove mrq from struct dw_mci_slot
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 16 Dec 2025 11:50:05 +0000 (19:50 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Feb 2026 11:06:53 +0000 (12:06 +0100)
struct dw_mci has already kept mrq, so removing keeping mrq again from
struct dw_mci_slot.

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
drivers/mmc/host/dw_mmc.h

index 18c44a23a698ae2ccbb8f43330d8b96959a4c4a0..02a88826928d8b57b3ec88d0533a2fea01dce5a7 100644 (file)
@@ -108,7 +108,7 @@ static int dw_mci_req_show(struct seq_file *s, void *v)
 
        /* Make sure we get a consistent snapshot */
        spin_lock_bh(&slot->host->lock);
-       mrq = slot->mrq;
+       mrq = slot->host->mrq;
 
        if (mrq) {
                cmd = mrq->cmd;
@@ -1260,7 +1260,7 @@ static void __dw_mci_start_request(struct dw_mci *host,
        struct mmc_data *data;
        u32 cmdflags;
 
-       mrq = slot->mrq;
+       mrq = host->mrq;
 
        host->mrq = mrq;
 
@@ -1316,7 +1316,7 @@ static void __dw_mci_start_request(struct dw_mci *host,
 static void dw_mci_start_request(struct dw_mci *host,
                                 struct dw_mci_slot *slot)
 {
-       struct mmc_request *mrq = slot->mrq;
+       struct mmc_request *mrq = host->mrq;
        struct mmc_command *cmd;
 
        cmd = mrq->sbc ? mrq->sbc : mrq->cmd;
@@ -1330,7 +1330,7 @@ static void dw_mci_queue_request(struct dw_mci *host, struct dw_mci_slot *slot,
        dev_vdbg(&host->mmc->class_dev, "queue request: state=%d\n",
                 host->state);
 
-       slot->mrq = mrq;
+       host->mrq = mrq;
 
        if (host->state == STATE_WAITING_CMD11_DONE) {
                dev_warn(&host->mmc->class_dev,
@@ -1356,7 +1356,7 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
        struct dw_mci_slot *slot = mmc_priv(mmc);
        struct dw_mci *host = slot->host;
 
-       WARN_ON(slot->mrq);
+       WARN_ON(host->mrq);
 
        /*
         * The check for card presence and queueing of the request must be
@@ -1816,7 +1816,6 @@ static void dw_mci_request_end(struct dw_mci *host, struct mmc_request *mrq)
 
        WARN_ON(host->cmd || host->data);
 
-       host->slot->mrq = NULL;
        host->mrq = NULL;
        if (!list_empty(&host->queue)) {
                slot = list_entry(host->queue.next,
index 99a69dacb3cdd40769f790324aa0e14ab4538f08..f91f5fcb94223517560ee2190821c4df056b8c1a 100644 (file)
@@ -64,7 +64,7 @@ struct dw_mci_dma_slave {
  * @fifo_reg: Pointer to MMIO registers for data FIFO
  * @sg: Scatterlist entry currently being processed by PIO code, if any.
  * @sg_miter: PIO mapping scatterlist iterator.
- * @mrq: The request currently being processed on @slot,
+ * @mrq: The request currently being processed on @host,
  *     or NULL if the controller is idle.
  * @cmd: The command currently being sent to the card, or NULL.
  * @data: The data currently being transferred, or NULL if no data
@@ -559,7 +559,6 @@ static inline int dw_mci_runtime_resume(struct device *device) { return -EOPNOTS
 /**
  * struct dw_mci_slot - MMC slot state
  * @host: The MMC controller this slot is using.
- * @mrq: mmc_request currently being processed or waiting to be
  *     processed, or NULL when the slot is idle.
  * @queue_node: List node for placing this node in the @queue list of
  *     &struct dw_mci.
@@ -568,7 +567,6 @@ static inline int dw_mci_runtime_resume(struct device *device) { return -EOPNOTS
 struct dw_mci_slot {
        struct dw_mci           *host;
 
-       struct mmc_request      *mrq;
        struct list_head        queue_node;
 };