Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5446609imb; Thu, 7 Mar 2019 16:16:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxaSDkMoKRHSUV901KPD9vgGRIyOVfK7sV3hLW3hS69L3BXppGIoXYrdG+HfFRpr0hLf3K6 X-Received: by 2002:a17:902:a418:: with SMTP id p24mr15963077plq.281.1552004202646; Thu, 07 Mar 2019 16:16:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552004202; cv=none; d=google.com; s=arc-20160816; b=LXJco/c3EBUriSBOLe5FalOSAU0VBduzhG0ZpAULx/iMc4/2wDdvO3izkkZVss2ClF 7bJuKFIov+vCd+L9pygnfK51Bj6eFqCNufvQlxjX10+Cn54MhQlhuUFI7xu+yEGe6dCc 98w+vltpdsJkFbHy1gLEfpKXuBbw5a2bmfI2r3bQuRaxQu67HJXrhbNszpXp1OQZwHn3 vW1+lPis+r//wIxyse4+t9UBCSiwZg1bJTWxsQ1W7KsKytiv1FOmV7OpnWg/bby/CU5/ U72pOq+s+apGUbmiNzewZ9YZodSvDDhn8Ms+co9XZmrHQ2X1GxXlgB4nV00XzDlQz5dQ 1yWA== 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:date:cc:to:from:subject:message-id; bh=RA4ZdtRQrYH/UDDJOaKOFIMCCQnLT5cnnTPzBT9mxE4=; b=h/wwf5S+ObJF25/n6hA5cOO4pkjdGmT874e2PN2+p6189P4eKJqsed6Et++BLuKPFs 1tPIFRgPUS/T3gsmEzot3uutUeDGQTd0uzCkEHtzfVaCpHPkXLieAp9S84bVZ3hUjoSN FAQmmxUjQGm9jCh/Wx/UT6ZX6AnbqujWX/bEPOVkBoqcdZH5vPRDM1kb0qB3jGAOlFa2 SpeLQABeRhhoFbHdgc7MtWmS0OhA+CgDS1aQ9yyAmhWf/WrBPNSQP8tHzol1F6MYvuAr hGvKewZcOkDMfo41puXkamBAOD+RHjGRqzg19TVrpFsnfVUZlJwhG+rbZRMjMn3G8Bor PwPw== 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 m32si5502669pld.262.2019.03.07.16.16.26; Thu, 07 Mar 2019 16:16:42 -0800 (PST) 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 S1726267AbfCHAQA (ORCPT + 99 others); Thu, 7 Mar 2019 19:16:00 -0500 Received: from smtprelay0140.hostedemail.com ([216.40.44.140]:54435 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726172AbfCHAP7 (ORCPT ); Thu, 7 Mar 2019 19:15:59 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 0245A837F27D; Fri, 8 Mar 2019 00:15:58 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:69:334:355:368:369:379:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2902:3138:3139:3140:3141:3142:3353:3865:3866:3868:3870:3871:3872:3874:4250:4321:5007:9592:10004:10400:10429:10430:10431:10848:11026:11473:11658:11914:12043:12296:12438:12555:12679:12760:12986:13161:13229:13439:13848:14093:14097:14181:14659:14721:19903:19997:21080:21627:30045:30046:30054:30089,0,RBL:149.142.244.224:@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:26,LUA_SUMMARY:none X-HE-Tag: join62_16dde06a1a41a X-Filterd-Recvd-Size: 2967 Received: from XPS-9350 (unknown [149.142.244.224]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Fri, 8 Mar 2019 00:15:57 +0000 (UTC) Message-ID: <5ef0cab4dee128058a43f43c723c13924662e80d.camel@perches.com> Subject: [possible PATCH] crypto: sahara - Use #ifdef DEBUG not IS_ENABLED(DEBUG) From: Joe Perches To: Herbert Xu , "David S. Miller" Cc: linux-crypto@vger.kernel.org, LKML Date: Thu, 07 Mar 2019 16:15:55 -0800 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 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(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 8c32a3059b4a..d2b4bd483507 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -348,14 +348,13 @@ static void sahara_decode_error(struct sahara_dev *dev, unsigned int error) dev_err(dev->device, "\n"); } -static const char *sahara_state[4] = { "Idle", "Busy", "Error", "HW Fault" }; - static void sahara_decode_status(struct sahara_dev *dev, unsigned int status) { +#ifdef DEBUG u8 state; - - if (!IS_ENABLED(DEBUG)) - return; + static const char *sahara_state[4] = { + "Idle", "Busy", "Error", "HW Fault" + }; state = SAHARA_STATUS_GET_STATE(status); @@ -400,15 +399,14 @@ static void sahara_decode_status(struct sahara_dev *dev, unsigned int status) sahara_read(dev, SAHARA_REG_CDAR)); dev_dbg(dev->device, "Initial DAR: 0x%08x\n\n", sahara_read(dev, SAHARA_REG_IDAR)); +#endif } static void sahara_dump_descriptors(struct sahara_dev *dev) { +#ifdef DEBUG int i; - if (!IS_ENABLED(DEBUG)) - return; - for (i = 0; i < SAHARA_MAX_HW_DESC; i++) { dev_dbg(dev->device, "Descriptor (%d) (%pad):\n", i, &dev->hw_phys_desc[i]); @@ -421,15 +419,14 @@ static void sahara_dump_descriptors(struct sahara_dev *dev) dev->hw_desc[i]->next); } dev_dbg(dev->device, "\n"); +#endif } static void sahara_dump_links(struct sahara_dev *dev) { +#ifdef DEBUG int i; - if (!IS_ENABLED(DEBUG)) - return; - for (i = 0; i < SAHARA_MAX_HW_LINK; i++) { dev_dbg(dev->device, "Link (%d) (%pad):\n", i, &dev->hw_phys_link[i]); @@ -439,6 +436,7 @@ static void sahara_dump_links(struct sahara_dev *dev) dev->hw_link[i]->next); } dev_dbg(dev->device, "\n"); +#endif } static int sahara_hw_descriptor_create(struct sahara_dev *dev)