aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Rothberg <valentinrothberg@gmail.com>2014-10-21 05:35:32 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-11-06 10:14:59 -0500
commit304576a776cc2fea7d40e6d7a58e4d4124f97f58 (patch)
treeacff5eb508a1b2b1fd0a84ab6ee6f7f4820a39f4
parentbac68f2c9a43e60a70e27c0c75aaca7128b6271d (diff)
crypto: aesni - remove unnecessary #define
The CPP identifier 'HAS_PCBC' is defined when the Kconfig option CRYPTO_PCBC is set as 'y' or 'm', and is further used in two ifdef blocks to conditionally compile source code. This indirection hides the actual Kconfig dependency and complicates readability. Moreover, it's inconsistent with the rest of the ifdef blocks in the file, which directly reference Kconfig options. This patch removes 'HAS_PCBC' and replaces its occurrences with the actual dependency on 'CRYPTO_PCBC' being set as 'y' or 'm'. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--arch/x86/crypto/aesni-intel_glue.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index 888950f29fd9..bcebf754466c 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -43,10 +43,6 @@
43#include <asm/crypto/glue_helper.h> 43#include <asm/crypto/glue_helper.h>
44#endif 44#endif
45 45
46#if defined(CONFIG_CRYPTO_PCBC) || defined(CONFIG_CRYPTO_PCBC_MODULE)
47#define HAS_PCBC
48#endif
49
50/* This data is stored at the end of the crypto_tfm struct. 46/* This data is stored at the end of the crypto_tfm struct.
51 * It's a type of per "session" data storage location. 47 * It's a type of per "session" data storage location.
52 * This needs to be 16 byte aligned. 48 * This needs to be 16 byte aligned.
@@ -547,7 +543,7 @@ static int ablk_ctr_init(struct crypto_tfm *tfm)
547 543
548#endif 544#endif
549 545
550#ifdef HAS_PCBC 546#if IS_ENABLED(CONFIG_CRYPTO_PCBC)
551static int ablk_pcbc_init(struct crypto_tfm *tfm) 547static int ablk_pcbc_init(struct crypto_tfm *tfm)
552{ 548{
553 return ablk_init_common(tfm, "fpu(pcbc(__driver-aes-aesni))"); 549 return ablk_init_common(tfm, "fpu(pcbc(__driver-aes-aesni))");
@@ -1377,7 +1373,7 @@ static struct crypto_alg aesni_algs[] = { {
1377 }, 1373 },
1378 }, 1374 },
1379#endif 1375#endif
1380#ifdef HAS_PCBC 1376#if IS_ENABLED(CONFIG_CRYPTO_PCBC)
1381}, { 1377}, {
1382 .cra_name = "pcbc(aes)", 1378 .cra_name = "pcbc(aes)",
1383 .cra_driver_name = "pcbc-aes-aesni", 1379 .cra_driver_name = "pcbc-aes-aesni",