crypto: aegis128 - Fix -Wunused-const-variable warning
authorYueHaibing <yuehaibing@huawei.com>
Thu, 22 Aug 2019 14:41:38 +0000 (22:41 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Aug 2019 08:05:30 +0000 (18:05 +1000)
crypto/aegis.h:27:32: warning:
 crypto_aegis_const defined but not used [-Wunused-const-variable=]

crypto_aegis_const is only used in aegis128-core.c,
just move the definition over there.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/aegis.h
crypto/aegis128-core.c

index 4d56a85aea49e07b1e66be7c9de1c236c0aa01cf..6920ebe7767953c53261960f5e203aa8422c9359 100644 (file)
@@ -24,17 +24,6 @@ union aegis_block {
 #define AEGIS_BLOCK_ALIGN (__alignof__(union aegis_block))
 #define AEGIS_ALIGNED(p) IS_ALIGNED((uintptr_t)p, AEGIS_BLOCK_ALIGN)
 
-static const union aegis_block crypto_aegis_const[2] = {
-       { .words64 = {
-               cpu_to_le64(U64_C(0x0d08050302010100)),
-               cpu_to_le64(U64_C(0x6279e99059372215)),
-       } },
-       { .words64 = {
-               cpu_to_le64(U64_C(0xf12fc26d55183ddb)),
-               cpu_to_le64(U64_C(0xdd28b57342311120)),
-       } },
-};
-
 static __always_inline void crypto_aegis_block_xor(union aegis_block *dst,
                                                   const union aegis_block *src)
 {
index fa69e99968e24d9ad5e0345b3f7e0a22f51fb5ea..80e73611bd5cdfd09b8f1b6ef2f8d80e1dda5a17 100644 (file)
@@ -45,6 +45,17 @@ struct aegis128_ops {
 
 static bool have_simd;
 
+static const union aegis_block crypto_aegis_const[2] = {
+       { .words64 = {
+               cpu_to_le64(U64_C(0x0d08050302010100)),
+               cpu_to_le64(U64_C(0x6279e99059372215)),
+       } },
+       { .words64 = {
+               cpu_to_le64(U64_C(0xf12fc26d55183ddb)),
+               cpu_to_le64(U64_C(0xdd28b57342311120)),
+       } },
+};
+
 static bool aegis128_do_simd(void)
 {
 #ifdef CONFIG_CRYPTO_AEGIS128_SIMD