From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnd Bergmann <arnd@arndb.de>, Haibo Chen <haibo.chen@nxp.com>,
"Arnd Bergmann" <arnd@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Luke Wang <ziniu.wang_1@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Ciprian Costea <ciprianmarian.costea@oss.nxp.com>,
Josua Mayer <josua@solid-run.com>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-mmc @ vger . kernel . org" <linux-mmc@vger.kernel.org>,
NXP S32 Linux Team <S32@nxp.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: esdhc-imx: convert to modern PM_OPS
Date: Fri, 11 Apr 2025 11:50:21 +0300 [thread overview]
Message-ID: <5e50249f-5184-46af-8daf-90d88b0a094e@intel.com> (raw)
In-Reply-To: <cda876c9-7dbf-4af1-9fc1-cbd9f379252d@app.fastmail.com>
On 11/04/25 08:45, Arnd Bergmann wrote:
> On Fri, Apr 11, 2025, at 04:45, Bough Chen wrote:
>>> From: Arnd Bergmann <arnd@kernel.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,
>
Can someone provide a Tested-by?
prev parent reply other threads:[~2025-04-11 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 14:09 [PATCH] mmc: esdhc-imx: convert to modern PM_OPS Arnd Bergmann
2025-04-11 2:45 ` Bough Chen
2025-04-11 5:45 ` Arnd Bergmann
2025-04-11 8:50 ` Adrian Hunter [this message]
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=5e50249f-5184-46af-8daf-90d88b0a094e@intel.com \
--to=adrian.hunter@intel.com \
--cc=S32@nxp.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=ciprianmarian.costea@oss.nxp.com \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=josua@solid-run.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=ziniu.wang_1@nxp.com \
/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