Re: [PATCH] PCI: Convert to new *_PM_OPS macros

From: Arnd Bergmann
Date: Thu Jul 21 2022 - 03:09:00 EST


On Tue, Jul 19, 2022 at 11:51 PM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
>
> From: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
>
> Replace SET_*_PM_OPS with *_PM_OPS, which which have the advantage that the
> compiler always sees the PM callbacks as referenced, so they don't need to
> be wrapped with "#ifdef CONFIG_PM_SLEEP" or tagged with "__maybe_unused" to
> avoid "defined but not used" warnings.
>
> See 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones").
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

I did some additional testing, using an arm allmodconfig kernel with CONFIG_PM
and/or CONFIG_PM_SLEEP disabled to ensure this does not cause any
unexpected regressions. Everything seems to work as intended.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
Tested-by: Arnd Bergmann <arnd@xxxxxxxx>