Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: delete is_first_req parameter from pre-request callback

The void (*pre_req) callback in the struct mmc_host_ops vtable
is passing an argument "is_first_req" indicating whether this is
the first request or not.

None of the in-kernel users use this parameter: instead, since
they all just do variants of dma_map* they use the DMA cookie
to indicate whether a pre* callback has already been done for
a request when they decide how to handle it.

Delete the parameter from the callback and all users, as it is
just pointless cruft.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Linus Walleij and committed by
Ulf Hansson
d3c6aac3 e173f891

+12 -23
+4 -7
drivers/mmc/core/core.c
··· 611 611 * mmc_pre_req - Prepare for a new request 612 612 * @host: MMC host to prepare command 613 613 * @mrq: MMC request to prepare for 614 - * @is_first_req: true if there is no previous started request 615 - * that may run in parellel to this call, otherwise false 616 614 * 617 615 * mmc_pre_req() is called in prior to mmc_start_req() to let 618 616 * host prepare for the new request. Preparation of a request may be 619 617 * performed while another request is running on the host. 620 618 */ 621 - static void mmc_pre_req(struct mmc_host *host, struct mmc_request *mrq, 622 - bool is_first_req) 619 + static void mmc_pre_req(struct mmc_host *host, struct mmc_request *mrq) 623 620 { 624 621 if (host->ops->pre_req) 625 - host->ops->pre_req(host, mrq, is_first_req); 622 + host->ops->pre_req(host, mrq); 626 623 } 627 624 628 625 /** ··· 664 667 665 668 /* Prepare a new request */ 666 669 if (areq) 667 - mmc_pre_req(host, areq->mrq, !host->areq); 670 + mmc_pre_req(host, areq->mrq); 668 671 669 672 if (host->areq) { 670 673 status = mmc_wait_for_data_req_done(host, host->areq->mrq, areq); ··· 693 696 694 697 /* prepare the request again */ 695 698 if (areq) 696 - mmc_pre_req(host, areq->mrq, !host->areq); 699 + mmc_pre_req(host, areq->mrq); 697 700 } 698 701 } 699 702
+1 -2
drivers/mmc/host/dw_mmc.c
··· 886 886 } 887 887 888 888 static void dw_mci_pre_req(struct mmc_host *mmc, 889 - struct mmc_request *mrq, 890 - bool is_first_req) 889 + struct mmc_request *mrq) 891 890 { 892 891 struct dw_mci_slot *slot = mmc_priv(mmc); 893 892 struct mmc_data *data = mrq->data;
+1 -2
drivers/mmc/host/jz4740_mmc.c
··· 320 320 } 321 321 322 322 static void jz4740_mmc_pre_request(struct mmc_host *mmc, 323 - struct mmc_request *mrq, 324 - bool is_first_req) 323 + struct mmc_request *mrq) 325 324 { 326 325 struct jz4740_mmc_host *host = mmc_priv(mmc); 327 326 struct mmc_data *data = mrq->data;
+1 -2
drivers/mmc/host/mmci.c
··· 699 699 next->dma_chan = NULL; 700 700 } 701 701 702 - static void mmci_pre_request(struct mmc_host *mmc, struct mmc_request *mrq, 703 - bool is_first_req) 702 + static void mmci_pre_request(struct mmc_host *mmc, struct mmc_request *mrq) 704 703 { 705 704 struct mmci_host *host = mmc_priv(mmc); 706 705 struct mmc_data *data = mrq->data;
+1 -2
drivers/mmc/host/mtk-sd.c
··· 927 927 msdc_start_command(host, mrq, mrq->cmd); 928 928 } 929 929 930 - static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, 931 - bool is_first_req) 930 + static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq) 932 931 { 933 932 struct msdc_host *host = mmc_priv(mmc); 934 933 struct mmc_data *data = mrq->data;
+1 -2
drivers/mmc/host/omap_hsmmc.c
··· 1565 1565 } 1566 1566 } 1567 1567 1568 - static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, 1569 - bool is_first_req) 1568 + static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq) 1570 1569 { 1571 1570 struct omap_hsmmc_host *host = mmc_priv(mmc); 1572 1571
+1 -2
drivers/mmc/host/rtsx_pci_sdmmc.c
··· 190 190 return using_cookie; 191 191 } 192 192 193 - static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, 194 - bool is_first_req) 193 + static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq) 195 194 { 196 195 struct realtek_pci_sdmmc *host = mmc_priv(mmc); 197 196 struct mmc_data *data = mrq->data;
+1 -2
drivers/mmc/host/sdhci.c
··· 2202 2202 data->host_cookie = COOKIE_UNMAPPED; 2203 2203 } 2204 2204 2205 - static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, 2206 - bool is_first_req) 2205 + static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq) 2207 2206 { 2208 2207 struct sdhci_host *host = mmc_priv(mmc); 2209 2208
+1 -2
include/linux/mmc/host.h
··· 93 93 */ 94 94 void (*post_req)(struct mmc_host *host, struct mmc_request *req, 95 95 int err); 96 - void (*pre_req)(struct mmc_host *host, struct mmc_request *req, 97 - bool is_first_req); 96 + void (*pre_req)(struct mmc_host *host, struct mmc_request *req); 98 97 void (*request)(struct mmc_host *host, struct mmc_request *req); 99 98 100 99 /*