[PATCH 0/2] linux/kconfig.h: move IF_ENABLED() out of <linux/kconfig.h>

From: Masahiro Yamada
Date: Thu Apr 08 2021 - 17:00:00 EST



I insist on <linux/kconfig.h> having only minimal set of macros
that are needed to evaluate CONFIG options.

Everytime somebody added an alien to <linux/kconfig.h>, I needed to
kick it out.

I did not notice 1b399bb04837183cecdc1b32ef1cfc7fcfa75d32 because
I was not addressed by [1].

[1]: https://lore.kernel.org/lkml/?q=kconfig.h%3A+Add+IF_ENABLED%28%29+macro

I like Paul's idea, but if I had noticed the patch in time, I would
have tried my best to persuade to implement it outside of <linux/kconfig.h>
(Paul's initial patch was adding it to a new header instead of <linux/kconfig.h>)

Before it is widely used, I want to fix it.

In 2/2, I converted pm.h to allow driver cleanups.



Masahiro Yamada (2):
linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in
<linux/kernel.h>
pm: allow drivers to drop #ifdef and __maybe_unused from pm callbacks

drivers/pinctrl/pinctrl-ingenic.c | 20 ++++-----
include/linux/kconfig.h | 6 ---
include/linux/kernel.h | 2 +
include/linux/pm.h | 67 +++++++++++--------------------
4 files changed, 36 insertions(+), 59 deletions(-)

--
2.27.0