From: Shawn Lin Date: Tue, 16 Dec 2025 11:50:05 +0000 (+0800) Subject: mmc: dw_mmc: Remove mrq from struct dw_mci_slot X-Git-Tag: v7.1-rc1~157^2~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78983c4d608b552de2e59e798c31230e03ca5a2d;p=thirdparty%2Fkernel%2Fstable.git mmc: dw_mmc: Remove mrq from struct dw_mci_slot struct dw_mci has already kept mrq, so removing keeping mrq again from struct dw_mci_slot. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 18c44a23a698a..02a88826928d8 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -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, diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index 99a69dacb3cdd..f91f5fcb94223 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -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; };