lkml.org 
[lkml]   [2019]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG)
From
Date
On Fri, 2019-03-22 at 17:21 +0100, Ard Biesheuvel wrote:
> On Fri, 22 Mar 2019 at 16:07, Joe Perches <joe@perches.com> wrote:
> > Maybe just adding a global #define in kernel.h like
> > #define IS_DEBUG_ENABLED IS_ENABLED(DEBUG)
[]
> __is_defined(DEBUG) seems to be the most appropriate here. I don't
> feel strongly about whether we or not should wrap it in another macro.
[]
> > A good thing about using IS_ENABLED or the suggested IS_DEBUG_ENABLED
> > would be that least gcc 5+ seems to automatically elide the uses of any
> > unreferenced static const char * arrays like the sahara_state uses here.
[]
> My vote would be to use __is_defined(DEBUG) in place, but if others
> prefer wrapping it in a macro, that is also fine with me.

I think __is_defined is fine too.
Either works for me.


\
 
 \ /
  Last update: 2019-03-22 17:29    [W:0.435 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site