Re: [PATCH 05/16] gpio: pl061: Use modern PM macros
From: Linus Walleij
Date: Thu Aug 21 2025 - 07:56:09 EST
On Wed, Aug 20, 2025 at 5:58 PM Jisheng Zhang <jszhang@xxxxxxxxxx> wrote:
> Use the modern PM macros for the suspend and resume functions to be
> automatically dropped by the compiler when CONFIG_PM or
> CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.
>
> This has the advantage of always compiling these functions in,
> independently of any Kconfig option. Thanks to that, bugs and other
> regressions are subsequently easier to catch.
>
> The pl061_context_save_regs structure is always embedded into struct
> pl061 to simplify code, so this brings a tiny 8 bytes memory overhead
> for !CONFIG_PM_SLEP.
>
> Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
Hm true, 8 bytes is not a big deal.
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij