From: Damien Le Moal <dlemoal@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Raphael Gallais-Pou <rgallaispou@gmail.com>
Cc: Niklas Cassel <cassel@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Hans de Goede <hdegoede@redhat.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Viresh Kumar <vireshk@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-sunxi@lists.linux.dev,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH RFC 14/14] ahci: sata_rcar: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
Date: Thu, 30 Jan 2025 11:30:43 +0900 [thread overview]
Message-ID: <5d8d4fa6-66ef-48c1-b13a-607a70e476f4@kernel.org> (raw)
In-Reply-To: <CAMuHMdWdXNB=ijpWHWY5HgwJw8yw4jk9Bnmez-8MLzGRCQrXdg@mail.gmail.com>
On 1/27/25 22:45, Geert Uytterhoeven wrote:
> Hi Raphael,
>
> On Mon, 27 Jan 2025 at 13:46, Raphael Gallais-Pou <rgallaispou@gmail.com> wrote:
>> Letting the compiler remove these functions when the kernel is built
>> without CONFIG_PM_SLEEP support is simpler and less error prone than the
>> use of #ifdef based kernel configuration guards.
>>
>> Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
>
> Thanks for your patch!
>
> The subsystem prefix is "ata", not "ahci" (not all ATA-drivers are
> AHCI-drivers).
Yep. The convention is:
ata: driver_name: xxx
So it would be:
ata: sata_rcar: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
for this patch. And the same comment applies to all your other patches in the
series.
>
>> --- a/drivers/ata/sata_rcar.c
>> +++ b/drivers/ata/sata_rcar.c
>> @@ -927,7 +927,6 @@ static void sata_rcar_remove(struct platform_device *pdev)
>> pm_runtime_disable(&pdev->dev);
>> }
>>
>> -#ifdef CONFIG_PM_SLEEP
>> static int sata_rcar_suspend(struct device *dev)
>> {
>> struct ata_host *host = dev_get_drvdata(dev);
>> @@ -1005,7 +1004,6 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
>> .poweroff = sata_rcar_suspend,
>> .restore = sata_rcar_restore,
>> };
>> -#endif
>
> If CONFIG_PM_SLEEP is disabled (e.g. m68k allyesconfig):
>
> drivers/ata/sata_rcar.c: In function ‘sata_rcar_suspend’:
> drivers/ata/sata_rcar.c:936:9: error: implicit declaration of
> function ‘ata_host_suspend’; did you mean ‘sata_rcar_suspend’?
> [-Werror=implicit-function-declaration]
> 936 | ata_host_suspend(host, PMSG_SUSPEND);
> | ^~~~~~~~~~~~~~~~
> | sata_rcar_suspend
> drivers/ata/sata_rcar.c: In function ‘sata_rcar_resume’:
> drivers/ata/sata_rcar.c:973:9: error: implicit declaration of
> function ‘ata_host_resume’; did you mean ‘sata_rcar_resume’?
> [-Werror=implicit-function-declaration]
> 973 | ata_host_resume(host);
> | ^~~~~~~~~~~~~~~
> | sata_rcar_resume
>
>>
>> static struct platform_driver sata_rcar_driver = {
>> .probe = sata_rcar_probe,
>> @@ -1013,9 +1011,7 @@ static struct platform_driver sata_rcar_driver = {
>> .driver = {
>> .name = DRV_NAME,
>> .of_match_table = sata_rcar_match,
>> -#ifdef CONFIG_PM_SLEEP
>> - .pm = &sata_rcar_pm_ops,
>> -#endif
>> + .pm = pm_sleep_ptr(&sata_rcar_pm_ops),
>> },
>> };
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-01-30 2:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 12:45 [RFC PATCH 00/14] AHCI power management cleanup Raphael Gallais-Pou
2025-01-27 12:45 ` [PATCH RFC 01/14] ahci: brcm: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Raphael Gallais-Pou
2025-01-27 12:45 ` [PATCH RFC 02/14] ahci: ceva: " Raphael Gallais-Pou
2025-01-27 12:45 ` [PATCH RFC 03/14] ahci: da850: " Raphael Gallais-Pou
2025-01-27 12:45 ` [PATCH RFC 04/14] ahci: dm816: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 05/14] ahci: imx: " Raphael Gallais-Pou
2025-01-27 15:13 ` Frank Li
2025-01-27 12:46 ` [PATCH RFC 06/14] ahci: mtk: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 07/14] ahci: platform: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 08/14] ahci: qoriq: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 09/14] ahci: seattle: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 10/14] ahci: sunxi: " Raphael Gallais-Pou
2025-01-29 18:43 ` Jernej Škrabec
2025-01-27 12:46 ` [PATCH RFC 11/14] ahci: pata_arasan_cf: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 12/14] ahci: pata_imx: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 13/14] ahci: sata_highbank: " Raphael Gallais-Pou
2025-01-27 12:46 ` [PATCH RFC 14/14] ahci: sata_rcar: " Raphael Gallais-Pou
2025-01-27 13:45 ` Geert Uytterhoeven
2025-01-30 2:30 ` Damien Le Moal [this message]
2025-01-27 16:30 ` [RFC PATCH 00/14] AHCI power management cleanup Geert Uytterhoeven
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=5d8d4fa6-66ef-48c1-b13a-607a70e476f4@kernel.org \
--to=dlemoal@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=cassel@kernel.org \
--cc=festevam@gmail.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=hdegoede@redhat.com \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=rgallaispou@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=vireshk@kernel.org \
--cc=wens@csie.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