lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5e50249f-5184-46af-8daf-90d88b0a094e@intel.com>
Date: Fri, 11 Apr 2025 11:50:21 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Arnd Bergmann <arnd@...db.de>, Haibo Chen <haibo.chen@....com>, "Arnd
 Bergmann" <arnd@...nel.org>, 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 11/04/25 08:45, Arnd Bergmann wrote:
> 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,
> 

Can someone provide a Tested-by?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ