lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcqPh4fWhdLYaETmgh0jvS_m9vzXgppgZX2nE8avSGymA@mail.gmail.com>
Date:   Fri, 30 Oct 2020 16:34:54 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Coiby Xu <coiby.xu@...il.com>
Cc:     Lee Jones <lee.jones@...aro.org>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Andy Shevchenko <andy@...nel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/9] mfd: intel_soc_pmic: remove unnecessary CONFIG_PM_SLEEP

On Fri, Oct 30, 2020 at 4:23 PM Coiby Xu <coiby.xu@...il.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.jones@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ