[PATCH v3 04/15] gpio: pl061: Use modern PM macros

Andy Shevchenko andriy.shevchenko at intel.com
Wed Nov 19 07:50:34 PST 2025


On Wed, Nov 19, 2025 at 10:43:16PM +0800, Jisheng Zhang 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.

As I pointed out you have a typo here

_SLEEP


...

> -#ifdef CONFIG_PM
>  	struct pl061_context_save_regs csave_regs;
> -#endif

Just leave it here, and drop that paragraph from the commit message.

The rest is fine.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list