[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cda876c9-7dbf-4af1-9fc1-cbd9f379252d@app.fastmail.com>
Date: Fri, 11 Apr 2025 07:45:27 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Haibo Chen" <haibo.chen@....com>, "Arnd Bergmann" <arnd@...nel.org>,
"Adrian Hunter" <adrian.hunter@...el.com>,
"Ulf Hansson" <ulf.hansson@...aro.org>, "Shawn Guo" <shawnguo@...nel.org>,
"Sascha Hauer" <s.hauer@...gutronix.de>, "Luke Wang" <ziniu.wang_1@....com>
Cc: "Pengutronix Kernel Team" <kernel@...gutronix.de>,
"Fabio Estevam" <festevam@...il.com>,
"Ciprian Costea" <ciprianmarian.costea@....nxp.com>,
"Josua Mayer" <josua@...id-run.com>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-mmc @ vger . kernel . org" <linux-mmc@...r.kernel.org>,
"NXP S32 Linux Team" <S32@....com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: esdhc-imx: convert to modern PM_OPS
On Fri, Apr 11, 2025, at 04:45, Bough Chen wrote:
>> From: Arnd Bergmann <arnd@...nel.org>
>> drivers/mmc/host/sdhci-esdhc-imx.c:1586:13: error: unused function
>> 'sdhc_esdhc_tuning_save' [-Werror,-Wunused-function]
>> 1586 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
>> | ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/sdhci-esdhc-imx.c:1608:13: error: unused function
>> 'sdhc_esdhc_tuning_restore' [-Werror,-Wunused-function]
>> 1608 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Remove the #ifdef checks and instead use the better macros that silently drop
>> the unused functions when PM is disabled.
>
> Thanks for this catching.
>
> How about add __maybe_unused to define this tuning_save/retore function?
That sounds counterproductive.
The new macros were introduced to allow removing all the pointless
__maybe_unused annotations, I see no reason to stick with the
legacy helpers here.
I did make a small mistake and ran into another warning later,
but this fixup should address that:
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -2112,7 +2112,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = {
.name = "sdhci-esdhc-imx",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = imx_esdhc_dt_ids,
- .pm = &sdhci_esdhc_pmops,
+ .pm = pm_ptr(&sdhci_esdhc_pmops),
},
.probe = sdhci_esdhc_imx_probe,
.remove = sdhci_esdhc_imx_remove,
Arnd
Powered by blists - more mailing lists