On Fri, 2019-03-22 at 17:21 +0100, Ard Biesheuvel wrote: > On Fri, 22 Mar 2019 at 16:07, Joe Perches <joe@xxxxxxxxxxx> 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.