Thread (30 messages) 30 messages, 6 authors, 2025-08-28

Re: [PATCH 05/16] gpio: pl061: Use modern PM macros

From: Linus Walleij <hidden>
Date: 2025-08-21 11:52:17
Also in: linux-gpio, linux-omap, lkml

On Wed, Aug 20, 2025 at 5:58 PM Jisheng Zhang [off-list ref] 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@kernel.org>
Hm true, 8 bytes is not a big deal.

Reviewed-by: Linus Walleij <redacted>

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help