From: Axel Lin <axel.lin@ingics.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: Javier Martin <javier.martin@vista-silicon.com>,
Steffen Trumtrar <s.trumtrar@pengutronix.de>,
linux-crypto@vger.kernel.org
Subject: [PATCH] crypto: sahara - Fix misuse of IS_ENABLED
Date: Mon, 10 Aug 2015 15:18:36 +0800 [thread overview]
Message-ID: <1439191116.22743.1.camel@ingics.com> (raw)
IS_ENABLED should only be used for CONFIG_* symbols.
So use #ifdef DEBUG instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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)
--
2.1.0
next reply other threads:[~2015-08-10 7:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 7:18 Axel Lin [this message]
2015-08-10 7:32 ` [PATCH] crypto: sahara - Fix misuse of IS_ENABLED Herbert Xu
2015-08-11 0:33 ` Axel Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439191116.22743.1.camel@ingics.com \
--to=axel.lin@ingics.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=javier.martin@vista-silicon.com \
--cc=linux-crypto@vger.kernel.org \
--cc=s.trumtrar@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox