Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp834041img; Fri, 22 Mar 2019 09:30:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8Zwlqu8TiR75d5VX8wjyAQffc8FuUQYANXntAFgRYsoTJya90lCa4l1823KbTFyxwRAYh X-Received: by 2002:a17:902:20e3:: with SMTP id v32mr10405042plg.213.1553272227487; Fri, 22 Mar 2019 09:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553272227; cv=none; d=google.com; s=arc-20160816; b=bIU81XdTrzqUwvliD0jyof6d8f8LUPJhysW5nMAfdov7KahQPWeQNoR92RqrI0d/zk g56XXRuVev5xonfGSeCcR0lcNYCESq51oeNj4vZWrEW0TvkkpLukjcENNP07Sn7UZpUf yw3SUyMuBQOBmvjs5LW3MtDPYlhlo+GLZqjF9e8RGyp7O9mYmbIebOfmVrJb4QO6kraD ahbGS5sAnEtcVnbYfyj3trnlx5L54FSnXWb2GDhb+Lzq2sE7xgBDWcYreW5CKnAjsf0L sXTPi+dTdxl6mCQI/3JTq8HQvy9QgPRgStmB9cklf6nNERYy688C4p820dGGQPUWBaRW RXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=LAgwkpaOfT/n7hk9p0d2DawYjQuqnE5+3g2bwz/Pja8=; b=g2X31IB4s60WBYvpciR04chWJrsdjH5F7TTSNsh8gLeDkPUDsCeafmXq0SXEQlG2ZN AFOE1jVdkYElZsNknKY3/XgotyffMIGLcBJ+ByQqBYGWygCrAamUxaFG9GPTr9xA7vuk tWtTlMubXGzWTUGb+3srd8HYlFLBP32OQMH3M+rS0tQnJVT3IoK3rK7FxBr/jS06Yf30 yfX5QES1vE9BWEYmLcvlCq1VXozyqvAS4/fUQmG7mBMxFe5ssd2OltuoF1HTFWJv/YBx Asu1bsaWs9lcO3bfJoeyGOZZX/tG7shE2L/GcPL+eTuYqoRymvQM9r1wM2s+hR39UBo+ aMtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h69si7172571pfc.120.2019.03.22.09.30.09; Fri, 22 Mar 2019 09:30:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbfCVQ33 (ORCPT + 99 others); Fri, 22 Mar 2019 12:29:29 -0400 Received: from smtprelay0198.hostedemail.com ([216.40.44.198]:39660 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726061AbfCVQ32 (ORCPT ); Fri, 22 Mar 2019 12:29:28 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 46CB3100E86C7; Fri, 22 Mar 2019 16:29:27 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:4605:5007:6119:7903:8784:10004:10400:10848:11026:11232:11473:11658:11914:12296:12740:12760:12895:13069:13311:13357:13439:13848:14181:14659:14721:21080:21451:21627:21740:30034:30054:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:31,LUA_SUMMARY:none X-HE-Tag: wish39_182d8e060ce3f X-Filterd-Recvd-Size: 2071 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Fri, 22 Mar 2019 16:29:26 +0000 (UTC) Message-ID: Subject: Re: [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG) From: Joe Perches To: Ard Biesheuvel Cc: Herbert Xu , "David S. Miller" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , LKML Date: Fri, 22 Mar 2019 09:29:24 -0700 In-Reply-To: References: <5ef0cab4dee128058a43f43c723c13924662e80d.camel@perches.com> <20190322124331.s5iu4ontsakv7he5@gondor.apana.org.au> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-03-22 at 17:21 +0100, Ard Biesheuvel wrote: > On Fri, 22 Mar 2019 at 16:07, Joe Perches 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.