From patchwork Mon Aug 10 07:18:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 6980231 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 95C839F358 for ; Mon, 10 Aug 2015 07:18:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37724206AA for ; Mon, 10 Aug 2015 07:18:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06A722062A for ; Mon, 10 Aug 2015 07:18:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbbHJHSm (ORCPT ); Mon, 10 Aug 2015 03:18:42 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:36577 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbbHJHSl (ORCPT ); Mon, 10 Aug 2015 03:18:41 -0400 Received: by pdco4 with SMTP id o4so68392462pdc.3 for ; Mon, 10 Aug 2015 00:18:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=ixPF2PgXebpiKV5t08kD8HjF/KvnTsHCziRppQJMT9U=; b=cVkSFGlAAJzIYDrr/cuPdQgAbNXauU3yVc7WjXe1GZhyKYyIxP7NDPuYa7cyEiAthy aiGMd0h8RSAE68epf1o3KvnJuR0eGPV4EnYpa/igYzMTHh9JxL8lEGmmFBbUXlZ0Oxm7 LVMmKubYsrOQpmx6Aj4pXfYd2qKcIZQOh6lCvm3ZQS+XN8lSvxQMn7ZuJbh4MdE+zUKh j6JLEJAU/v8SgTtY1r5RS7YqScYcF3kZdqbJG63ysBYDVLdCRZsFSLNc4vgWtkjEqqGt /bXqn75Z2o1NEVKMxCczRvIy+F4A4d2c5yjVzbiFltx3w5/1GYh8BjhYSAVHp+7T70Je 9iEw== X-Gm-Message-State: ALoCoQm0xRjbeI6OVh93hooXjlQtZV5yUyN21xE6DAEf2TL3169+8Gidic0X6EKGM4CK6sQ5Oqsw X-Received: by 10.70.38.69 with SMTP id e5mr41704857pdk.27.1439191121118; Mon, 10 Aug 2015 00:18:41 -0700 (PDT) Received: from phoenix (59-115-243-103.dynamic.hinet.net. [59.115.243.103]) by smtp.gmail.com with ESMTPSA id si3sm18768476pac.5.2015.08.10.00.18.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 00:18:40 -0700 (PDT) Message-ID: <1439191116.22743.1.camel@ingics.com> Subject: [PATCH] crypto: sahara - Fix misuse of IS_ENABLED From: Axel Lin To: Herbert Xu , "David S. Miller" Cc: Javier Martin , Steffen Trumtrar , linux-crypto@vger.kernel.org Date: Mon, 10 Aug 2015 15:18:36 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IS_ENABLED should only be used for CONFIG_* symbols. So use #ifdef DEBUG instead. Signed-off-by: Axel Lin --- drivers/crypto/sahara.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 397a500b..b2661a5 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -384,11 +384,9 @@ static 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; - state = SAHARA_STATUS_GET_STATE(status); dev_dbg(dev->device, "%s: Status Register = 0x%08x\n", @@ -432,15 +430,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) (0x%08x):\n", i, dev->hw_phys_desc[i]); @@ -453,15 +450,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) (0x%08x):\n", i, dev->hw_phys_link[i]); @@ -471,6 +467,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)