Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp735087img; Fri, 22 Mar 2019 07:31:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR6sayhg/tKXVP1M03qomVU698+1aXBdzbBmZJRZHabMiQdfecgpkrJ/DhyPozEWn+oLcC X-Received: by 2002:a63:4620:: with SMTP id t32mr7873328pga.363.1553265076850; Fri, 22 Mar 2019 07:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553265076; cv=none; d=google.com; s=arc-20160816; b=1H5K9UZHV69SB218ePFB2/RHHAdX+qAktlRE5sQEyYFuhigbRhBTTwKPBdcfwziXZh wE2psaU0gl4ffiAJwSasCRA+K7non5KB+4ZTfHDAmaUY441Bgx3XZei6lm0e/ZdS6HSa bwSntinZb3sBFXtBkK8+yh/aU1xK/QF/I/nMLo8ivzOjEOoSjXsceHEovJ7tSZvL0355 zikWwdKGTVI7bx+3iYN4nM7SrRTmNzrzDa8/E8f5lXs7kYla3JxRkzcoyRrWThmNivn9 EFR6a3huhpvQckn7sK6wtihUluib9I5J2QA4F8TtLza7tr/QlnTwsg6dYEGXvIvmdxRB 1VHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QQyDvol/ZkwyON17LT8cc20UHU5oOrQXWuMB2vBnctg=; b=MGt8MIOCyk76av1fRAUSWbU8JQBeVqTHcpWnqS/V7ukG8Ffs3sWs+8XjyUU8laYfDA +6ojkFk7kVcxLN8SYLQKNof4+BoZEV1KYEPMbD23nvx1sC+UcwXKIDBiqtbV4BqFoP8x cuJctNMumc5RyM5WnIJhgVORDTJqsAxk3Xg/QhBfgNqfY3aayOphNJ0AzoKuAA3U1Va4 v12FYx3s4K9ALAlkXr2m+XjVqOeFr/eACAkYFllGOQdmBhmzWUcM6sT02rsvsIA4+zWn Ld0gFCGKWY1NzMTeT/56KeFzrOwUmQpp0SCp7IZjpV1vkdhssquaij1vNOjaqBsfkeXN 0/LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XdnQSfC1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si7195255plq.169.2019.03.22.07.30.59; Fri, 22 Mar 2019 07:31:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=XdnQSfC1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728742AbfCVOaL (ORCPT + 99 others); Fri, 22 Mar 2019 10:30:11 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:55734 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727964AbfCVOaK (ORCPT ); Fri, 22 Mar 2019 10:30:10 -0400 Received: by mail-it1-f193.google.com with SMTP id z126so3945439itd.5 for ; Fri, 22 Mar 2019 07:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QQyDvol/ZkwyON17LT8cc20UHU5oOrQXWuMB2vBnctg=; b=XdnQSfC162O8igMo/zEqPfkBfvLoNh86g0xKQ6BX8HRYfrJNrt8NFfMYgxBbgHhKVG 0oskFSo4n1u5ig1D1ox6KoQl/VuKhXah0/C1iX43kLn22esHDqCrtkEXzg8hXki/d5lx rxh8aFM3JsqBg1YTPzO1GD4ltkd563oe7O8gELvkouu/VHUcYpIUA+OFY42eNrMXpgpg 0FYNkNBn8aGEDN6/Yf2KzWFjXaCWASPCEMHwRFOYNNZ7vFH1kON737RBn/MfNK3dK1bu CLA4aSbnVbrjRVII2nwrIDK7j3NBQ80l7L8iV8+m5vJ5b1rnNxvpHenWn6YuAE0vGAsj wVcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QQyDvol/ZkwyON17LT8cc20UHU5oOrQXWuMB2vBnctg=; b=aJJlZ3mfyA7becB8vqlvJRlabLJZiHzRrEY19xZEF/SC15fdLpdxATeCwyxfODfeP+ N8j+kHrgI2osKvYhVjYao1wWXdphb884S0czxl10Bfv5Wdk+h4IgggVgK3iWSVF9UiwT qyYzgAnuq9Iha7EameQHoNL+cG/3WkMr1wparbvuwUow6txbF1nlBZL1kGNPXvbLaBMI T4YPQ70aAxFKM3/mu1nBpvVw7/Ec+BKyVwypdt5wu2PBSrhMNIIbXsyIsL9NdwqiEnCT mQnOH/QzOPe6ZJ4dDpMuNb95QJDQpo/o5Gw+ztz+Aw8oeIJ5WOqoYU2FEyAlx+JnnA0t /Osg== X-Gm-Message-State: APjAAAX1EcVkOJJysAB9A5cq9gNNR81iRQA2RhO6jUpJ1Ijm8MyVDLfr fRqC1a6nEU9nk4ef0rlodixpbvTQwK4PMR+xMe4bdQ== X-Received: by 2002:a02:9f19:: with SMTP id z25mr4081052jal.2.1553265009899; Fri, 22 Mar 2019 07:30:09 -0700 (PDT) MIME-Version: 1.0 References: <5ef0cab4dee128058a43f43c723c13924662e80d.camel@perches.com> <20190322124331.s5iu4ontsakv7he5@gondor.apana.org.au> In-Reply-To: <20190322124331.s5iu4ontsakv7he5@gondor.apana.org.au> From: Ard Biesheuvel Date: Fri, 22 Mar 2019 15:29:59 +0100 Message-ID: Subject: Re: [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG) To: Herbert Xu Cc: Joe Perches , "David S. Miller" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Mar 2019 at 13:43, Herbert Xu wrote: > > On Thu, Mar 07, 2019 at 04:15:55PM -0800, Joe Perches wrote: > > Normal use of IS_ENABLED is with a CONFIG_ and > > there is no -DDEBUG in the Makefile here. > > > > Replace the IS_ENABLED(DEBUG) with #ifdef DEBUG/#endif > > blocks. > > > > Miscellanea: > > > > o Move the sahara_state array into the function that uses it. > > > > Signed-off-by: Joe Perches > > --- > > drivers/crypto/sahara.c | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > Even if this is correct this is way too ugly. The original code > at least compiled everything regardless of macros. Your new code > won't detect compile errors in debugging code unless debugging is > enabled. > What's wrong with IS_ENABLED(DEBUG) anyway? It may not be 'normal use' but it works fine.