From: Aubin Constans <aubin.constans@microchip.com>
To: Binbin Zhou <zhoubinbin@loongson.cn>,
Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Huacai Chen <chenhuacai@kernel.org>, <linux-mmc@vger.kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>
Subject: Re: [PATCH v3 02/36] mmc: atmel: Use devm_mmc_alloc_host() helper
Date: Tue, 10 Jun 2025 11:21:43 +0200 [thread overview]
Message-ID: <1bb2658a-8615-481d-a569-ba7c9a8e2a67@microchip.com> (raw)
In-Reply-To: <0688b77b93d27bd2f2e155fca6f53a1766fc3a80.1748933789.git.zhoubinbin@loongson.cn>
On 03/06/2025 14:25, Binbin Zhou wrote:
> Use new function devm_mmc_alloc_host() to simplify the code.
>
> Cc: Aubin Constans <aubin.constans@microchip.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Aubin Constans <aubin.constans@microchip.com>
> ---
> drivers/mmc/host/atmel-mci.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 14e981b834b6..f72fe4b805f6 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -2247,7 +2247,7 @@ static int atmci_init_slot(struct atmel_mci *host,
> struct atmel_mci_slot *slot;
> int ret;
>
> - mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), dev);
> + mmc = devm_mmc_alloc_host(dev, sizeof(*slot));
> if (!mmc)
> return -ENOMEM;
>
> @@ -2320,10 +2320,8 @@ static int atmci_init_slot(struct atmel_mci *host,
> host->slot[id] = slot;
> mmc_regulator_get_supply(mmc);
> ret = mmc_add_host(mmc);
> - if (ret) {
> - mmc_free_host(mmc);
> + if (ret)
> return ret;
> - }
>
> if (slot->detect_pin) {
> timer_setup(&slot->detect_timer, atmci_detect_change, 0);
> @@ -2361,7 +2359,6 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
> }
>
> slot->host->slot[id] = NULL;
> - mmc_free_host(slot->mmc);
> }
>
> static int atmci_configure_dma(struct atmel_mci *host)
> --
> 2.47.1
>
next prev parent reply other threads:[~2025-06-10 9:22 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 12:25 [PATCH v3 00/36] mmc: Cleanup mmc_alloc_host() usage Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 01/36] mmc: alcor: Use devm_mmc_alloc_host() helper Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 02/36] mmc: atmel: " Binbin Zhou
2025-06-10 9:21 ` Aubin Constans [this message]
2025-06-03 12:25 ` [PATCH v3 03/36] mmc: au1xmmc: " Binbin Zhou
2025-06-03 13:34 ` Manuel Lauss
2025-06-03 12:25 ` [PATCH v3 04/36] mmc: bcm2835: " Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 05/36] mmc: cavium: " Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 06/36] mmc: cb710: " Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 07/36] mmc: davinci_mmc: " Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 08/36] mmc: dw_mmc: " Binbin Zhou
2025-06-03 12:25 ` [PATCH v3 09/36] mmc: jz4740: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 10/36] mmc: litex_mmc: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 11/36] mmc: meson-mx-sdhc: " Binbin Zhou
2025-06-03 20:02 ` Martin Blumenstingl
2025-06-03 12:26 ` [PATCH v3 12/36] mmc: mmci: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 13/36] mmc: moxart-mmc: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 14/36] mmc: mvsdio: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 15/36] mmc: mxcmmc: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 16/36] mmc: mxs-mmc: " Binbin Zhou
2025-06-03 12:26 ` [PATCH v3 17/36] mmc: omap: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 18/36] mmc: omap_hsmmc: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 19/36] mmc: owl-mmc: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 20/36] mmc: pxamci: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 21/36] mmc: rtsx_pci: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 22/36] mmc: rtsx_usb_sdmmc: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 23/36] mmc: sdricoh_cs: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 24/36] mmc: sh_mmicf: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 25/36] mmc: tifm_sd: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 26/36] mmc: toshsd: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 27/36] mmc: usdhi6ro10: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 28/36] mmc: ushc: " Binbin Zhou
2025-06-03 12:27 ` [PATCH v3 29/36] mmc: via-sdmmc: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 30/36] mmc: vub300: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 31/36] mmc: wbsd: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 32/36] mmc: wmt-sdmmc: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 33/36] mmc: tmio: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 34/36] mmc: sunxi: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 35/36] mmc: mmc_spi: " Binbin Zhou
2025-06-03 12:28 ` [PATCH v3 36/36] mmc: meson-mx-sdio: " Binbin Zhou
2025-06-03 20:02 ` Martin Blumenstingl
2025-06-03 20:49 ` Martin Blumenstingl
2025-06-04 3:02 ` Binbin Zhou
2025-06-04 19:37 ` Martin Blumenstingl
2025-06-19 11:19 ` [PATCH v3 00/36] mmc: Cleanup mmc_alloc_host() usage Ulf Hansson
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=1bb2658a-8615-481d-a569-ba7c9a8e2a67@microchip.com \
--to=aubin.constans@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=claudiu.beznea@tuxon.dev \
--cc=linux-mmc@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--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