From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Binbin Zhou <zhoubinbin@loongson.cn>
Cc: Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Ulf Hansson <ulf.hansson@linaro.org>,
Huacai Chen <chenhuacai@kernel.org>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH 06/36] mmc: cb710: Use devm_mmc_alloc_host() helper
Date: Wed, 21 May 2025 11:48:02 +0200 [thread overview]
Message-ID: <aC2hUpVu8R7cPQTW@qmqm.qmqm.pl> (raw)
In-Reply-To: <4fa83917fec4ec648b12cb1ac1fc0626c15c0946.1747739323.git.zhoubinbin@loongson.cn>
On Tue, May 20, 2025 at 07:45:07PM +0800, Binbin Zhou wrote:
> Use new function devm_mmc_alloc_host() to simplify the code.
Acked-by: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
> drivers/mmc/host/cb710-mmc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
> index d741c1f9cf87..8787e7f49e94 100644
> --- a/drivers/mmc/host/cb710-mmc.c
> +++ b/drivers/mmc/host/cb710-mmc.c
> @@ -692,7 +692,7 @@ static int cb710_mmc_init(struct platform_device *pdev)
> int err;
> u32 val;
>
> - mmc = mmc_alloc_host(sizeof(*reader), cb710_slot_dev(slot));
> + mmc = devm_mmc_alloc_host(cb710_slot_dev(slot), sizeof(*reader));
> if (!mmc)
> return -ENOMEM;
>
> @@ -741,7 +741,6 @@ static int cb710_mmc_init(struct platform_device *pdev)
> dev_dbg(cb710_slot_dev(slot), "mmc_add_host() failed: %d\n", err);
>
> cb710_set_irq_handler(slot, NULL);
> - mmc_free_host(mmc);
> return err;
> }
>
> @@ -764,8 +763,6 @@ static void cb710_mmc_exit(struct platform_device *pdev)
> cb710_write_port_16(slot, CB710_MMC_CONFIGB_PORT, 0);
>
> cancel_work_sync(&reader->finish_req_bh_work);
> -
> - mmc_free_host(mmc);
> }
>
> static struct platform_driver cb710_mmc_driver = {
> --
> 2.47.1
>
--
Michał Mirosław
next prev parent reply other threads:[~2025-05-21 9:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 11:44 [PATCH 00/36] mmc: Cleanup mmc_alloc_host() usage Binbin Zhou
2025-05-20 11:44 ` [PATCH 01/36] mmc: alcor: Use devm_mmc_alloc_host() helper Binbin Zhou
2025-05-20 11:44 ` [PATCH 02/36] mmc: atmel: " Binbin Zhou
2025-05-20 11:44 ` [PATCH 03/36] mmc: au1xmmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 04/36] mmc: bcm2835: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 05/36] mmc: cavium: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 06/36] mmc: cb710: " Binbin Zhou
2025-05-21 9:48 ` Michał Mirosław [this message]
2025-05-20 11:45 ` [PATCH 07/36] mmc: davinci_mmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 08/36] mmc: dw_mmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 09/36] mmc: jz4740: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 10/36] mmc: litex_mmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 11/36] mmc: meson-mx-sdhc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 12/36] mmc: mmci: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 13/36] mmc: moxart-mmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 14/36] mmc: mvsdio: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 15/36] mmc: mxcmmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 16/36] mmc: mxs-mmc: " Binbin Zhou
2025-05-20 11:45 ` [PATCH 17/36] mmc: omap: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 18/36] mmc: omap_hsmmc: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 19/36] mmc: owl-mmc: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 20/36] mmc: pxamci: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 21/36] mmc: rtsx_pci: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 22/36] mmc: rtsx_usb_sdmmc: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 23/36] mmc: sdricoh_cs: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 24/36] mmc: ish_mmicf: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 25/36] mmc: tifm_sd: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 26/36] mmc: toshsd: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 27/36] mmc: usdhi6ro10: " Binbin Zhou
2025-05-22 7:48 ` Jesper Nilsson
2025-05-20 11:46 ` [PATCH 28/36] mmc: ushc: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 29/36] mmc: via-sdmmc: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 30/36] mmc: vub300: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 31/36] mmc: wbsd: " Binbin Zhou
2025-05-20 11:46 ` [PATCH 32/36] mmc: wmt-sdmmc: " Binbin Zhou
2025-05-20 20:23 ` Alexey Charkov
2025-05-20 11:47 ` [PATCH 33/36] mmc: tmio: " Binbin Zhou
2025-05-20 11:47 ` [PATCH 34/36] mmc: sunxi: " Binbin Zhou
2025-05-20 11:47 ` [PATCH 35/36] mmc: mmc_spi: " Binbin Zhou
2025-05-20 11:47 ` [PATCH 36/36] mmc: meson-mx-sdio: " Binbin Zhou
2025-05-20 19:46 ` Martin Blumenstingl
2025-05-20 12:42 ` [PATCH 00/36] mmc: Cleanup mmc_alloc_host() usage Ulf Hansson
2025-05-20 12:58 ` Huacai Chen
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=aC2hUpVu8R7cPQTW@qmqm.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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