[lkml]   [2020]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/9] mfd: intel_soc_pmic: remove unnecessary CONFIG_PM_SLEEP
On Fri, Oct 30, 2020 at 4:23 PM Coiby Xu <> 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 <> 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

 \ /
  Last update: 2020-10-30 15:34    [W:0.094 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site