On Fri, Oct 30, 2020 at 4:23 PM Coiby Xu <coiby...@gmail.com> wrote: > On Thu, Oct 29, 2020 at 07:04:44PM +0200, Andy Shevchenko wrote: > >On Thu, Oct 29, 2020 at 5:27 PM Lee Jones <lee.jo...@linaro.org> wrote:
... > >There are pros and cons of each approach, but not above. > > > Can you elaborate on the pros and cons of each approach? There's > convincing reason to prefer __maybe_unused over CONFIG_PM_SLEEP > according to Arnd Bergmann [1], First what comes to my mind. Perhaps more, but somebody else may extend / correct below. ifdeffery (pros): - compiler doesn't need even to look at that code ifdeffery (cons): - if depends on configuration and thus harder to test coverage __maybe_unused (pros): - removes ugly ifdeffery in the code, increases readability __maybe_unused (cons): - it's a burden for compiler (increasing compilation time) and to linker (to drop the section) -- With Best Regards, Andy Shevchenko