[PATCH v2 01/15] gpio: dwapb: Use modern PM macros
Andy Shevchenko
andy.shevchenko at gmail.com
Tue Nov 18 02:15:35 PST 2025
On Tue, Nov 18, 2025 at 2:50 AM Jisheng Zhang <jszhang at kernel.org> 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 dwapb_context structure is always embedded into struct
> dwapb_gpio_port to simplify code. Sure this brings a tiny 36 bytes
> data overhead for !CONFIG_PM_SLEP. After greping the arm/arm64/riscv
SLEEP
grepping
> dts dir, the max port number is 6, the berlin2q soc families, so this
> means current we have wasted 216 bytes memory which is trivial
currently
> compared to the system memory.
I still think the embedding is not related to this change and should
be justified in a separate patch. W/o that part the rest looks fine.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list