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

Andy Shevchenko andriy.shevchenko at intel.com
Wed Nov 19 07:52:53 PST 2025


On Wed, Nov 19, 2025 at 10:43:12PM +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 or
> __maybe_unused.
> 
> 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.
> 
> Almost all drivers are converted, only gpio-tegra and gpio-mlxbf are
> left as is, because the memory for saving HW context is not trivial,
> if we convert them, then the two drivers' users may complain for
> !CONFIG_PM && !CONFIG_PM_SLEEP case. So I didn't touch them.
> 
> patch to gpio-dwapb.c is tested on real HW, others are compile-tested only.

Thanks for the changes, but...

This series still does additional things that make the memory consumption grow
for no purpose. I suggest to leave ifdeffery around members and do it in a
separate series with all reasoning and good points. With this split done, I
will immediately review and give tags for the patches as I'm totally in favour
of using pm_ptr() and pm_sleep_ptr().

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list