Commit 824db5cd authored by Tianjia Zhang's avatar Tianjia Zhang Committed by Herbert Xu

crypto: arm64 - Fix unused variable compilation warnings of cpu_feature

The cpu feature defined by MODULE_DEVICE_TABLE is only referenced when
compiling as a module, and the warning of unused variable will be
encountered when compiling with intree. The warning can be removed by
adding the __maybe_unused flag.

Fixes: 03c9a333 ("crypto: arm64/ghash - add NEON accelerated fallback for 64-bit PMULL")
Fixes: ae1b83c7 ("crypto: arm64/sm4 - add CE implementation for GCM mode")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4f1c596d
...@@ -508,7 +508,7 @@ static void __exit ghash_ce_mod_exit(void) ...@@ -508,7 +508,7 @@ static void __exit ghash_ce_mod_exit(void)
crypto_unregister_shash(&ghash_alg); crypto_unregister_shash(&ghash_alg);
} }
static const struct cpu_feature ghash_cpu_feature[] = { static const struct cpu_feature __maybe_unused ghash_cpu_feature[] = {
{ cpu_feature(PMULL) }, { } { cpu_feature(PMULL) }, { }
}; };
MODULE_DEVICE_TABLE(cpu, ghash_cpu_feature); MODULE_DEVICE_TABLE(cpu, ghash_cpu_feature);
......
...@@ -271,7 +271,7 @@ static void __exit sm4_ce_gcm_exit(void) ...@@ -271,7 +271,7 @@ static void __exit sm4_ce_gcm_exit(void)
crypto_unregister_aead(&sm4_gcm_alg); crypto_unregister_aead(&sm4_gcm_alg);
} }
static const struct cpu_feature sm4_ce_gcm_cpu_feature[] = { static const struct cpu_feature __maybe_unused sm4_ce_gcm_cpu_feature[] = {
{ cpu_feature(PMULL) }, { cpu_feature(PMULL) },
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment