From: Adrian Hunter <adrian.hunter@intel.com>
To: Ethan Nelson-Moore <enelsonmoore@gmail.com>, <linux-mmc@vger.kernel.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] mmc: remove unnecessary module_init/exit functions
Date: Mon, 2 Feb 2026 08:39:26 +0200 [thread overview]
Message-ID: <e4b5d1ba-014f-4464-b25a-658f540fea81@intel.com> (raw)
In-Reply-To: <20260131020039.45966-1-enelsonmoore@gmail.com>
On 31/01/2026 04:00, Ethan Nelson-Moore wrote:
> Three MMC drivers have unnecessary module_init and module_exit functions
> that are empty or just print a message. Remove them. Note that if a
> module_init function exists, a module_exit function must also exist;
> otherwise, the module cannot be unloaded.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Doesn't seem to apply cleanly to mmc 'next' branch:
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/log/?h=next
Fix that and you can add:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/dw_mmc.c | 13 -------------
> drivers/mmc/host/sdhci-pltfm.c | 13 -------------
> drivers/mmc/host/sdhci-uhs2.c | 13 +------------
> 3 files changed, 1 insertion(+), 38 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 9e74b675e92d..613d74d2e946 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3693,19 +3693,6 @@ int dw_mci_runtime_resume(struct device *dev)
> EXPORT_SYMBOL(dw_mci_runtime_resume);
> #endif /* CONFIG_PM */
>
> -static int __init dw_mci_init(void)
> -{
> - pr_info("Synopsys Designware Multimedia Card Interface Driver\n");
> - return 0;
> -}
> -
> -static void __exit dw_mci_exit(void)
> -{
> -}
> -
> -module_init(dw_mci_init);
> -module_exit(dw_mci_exit);
> -
> MODULE_DESCRIPTION("DW Multimedia Card Interface driver");
> MODULE_AUTHOR("NXP Semiconductor VietNam");
> MODULE_AUTHOR("Imagination Technologies Ltd");
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 7f6ac636f040..d4fb60c1ef69 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -215,19 +215,6 @@ const struct dev_pm_ops sdhci_pltfm_pmops = {
> };
> EXPORT_SYMBOL_GPL(sdhci_pltfm_pmops);
>
> -static int __init sdhci_pltfm_drv_init(void)
> -{
> - pr_info("sdhci-pltfm: SDHCI platform and OF driver helper\n");
> -
> - return 0;
> -}
> -module_init(sdhci_pltfm_drv_init);
> -
> -static void __exit sdhci_pltfm_drv_exit(void)
> -{
> -}
> -module_exit(sdhci_pltfm_drv_exit);
> -
> MODULE_DESCRIPTION("SDHCI platform and OF driver helper");
> MODULE_AUTHOR("Intel Corporation");
> MODULE_LICENSE("GPL v2");
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index c459a08d01da..41e49c6cc751 100644
> --- a/drivers/mmc/host/sdhci-uhs2.c
> +++ b/drivers/mmc/host/sdhci-uhs2.c
> @@ -1126,7 +1126,7 @@ static irqreturn_t sdhci_uhs2_thread_irq(int irq, void *dev_id)
>
> /*****************************************************************************\
> * *
> - * Driver init/exit *
> + * Driver init *
> * *
> \*****************************************************************************/
>
> @@ -1138,17 +1138,6 @@ static int sdhci_uhs2_host_ops_init(struct sdhci_host *host)
> return 0;
> }
>
> -static int __init sdhci_uhs2_mod_init(void)
> -{
> - return 0;
> -}
> -module_init(sdhci_uhs2_mod_init);
> -
> -static void __exit sdhci_uhs2_mod_exit(void)
> -{
> -}
> -module_exit(sdhci_uhs2_mod_exit);
> -
> /*****************************************************************************\
> *
> * Device allocation/registration *
next prev parent reply other threads:[~2026-02-02 6:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 2:00 [PATCH] mmc: remove unnecessary module_init/exit functions Ethan Nelson-Moore
2026-02-02 1:04 ` Shawn Lin
2026-02-02 6:39 ` Adrian Hunter [this message]
2026-02-02 12:31 ` Ulf Hansson
2026-02-02 20:40 ` Ethan Nelson-Moore
2026-02-02 20:41 ` Ethan Nelson-Moore
2026-02-03 11:15 ` Ulf Hansson
2026-02-10 2:25 ` Ethan Nelson-Moore
2026-02-10 13:04 ` Ulf Hansson
2026-02-10 20:37 ` Ethan Nelson-Moore
2026-02-11 11:24 ` Ulf Hansson
2026-02-23 14:12 ` 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=e4b5d1ba-014f-4464-b25a-658f540fea81@intel.com \
--to=adrian.hunter@intel.com \
--cc=enelsonmoore@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.org \
/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