Re: [PATCH 00/49] iio: Tree wide switch from CONFIG_PM* to __maybe_unused etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 27, 2021 at 7:02 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Tue, 23 Nov 2021 22:11:08 +0000 Paul Cercueil <paul@xxxxxxxxxxxxxxx> wrote:
?
> > The problem then is that the SET_*_PM_OPS macros are defined
> > differently according to CONFIG_PM, so their definition would need to
> > be changed to use the (redefined) pm_ptr() macro and a corresponding
> > pm_sleep_ptr() macro.
>
> Small question here.  Why would these macros need to use pm_ptr() macro at all?
>
> Why not just stop them being conditional on CONFIG_PM at all and let dead
> code removal kill them off for us?  You might want to do something different
> for the CONFIG_PM_SLEEP ones though if we care about having it that fine
> grained.

Agreed, there is no need to use pm_ptr() inside of the new macros, it would just
be convenient to define them this way.

The only requirement is to use a construct with the ?: operator that gets
evaluated at compile time based on CONFIG_PM and CONFIG_PM_SLEEP
so that DCE can do its magic.

        Arnd



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux