linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] crypto: aegis128 - Fix -Wunused-const-variable warning
@ 2019-08-22 14:41 YueHaibing
  2019-08-30  8:24 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-08-22 14:41 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, linux-kernel, YueHaibing

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>
---
 crypto/aegis.h         | 11 -----------
 crypto/aegis128-core.c | 11 +++++++++++
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/crypto/aegis.h b/crypto/aegis.h
index 4d56a85..6920ebe 100644
--- a/crypto/aegis.h
+++ b/crypto/aegis.h
@@ -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)
 {
diff --git a/crypto/aegis128-core.c b/crypto/aegis128-core.c
index fa69e99..80e7361 100644
--- a/crypto/aegis128-core.c
+++ b/crypto/aegis128-core.c
@@ -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
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] crypto: aegis128 - Fix -Wunused-const-variable warning
  2019-08-22 14:41 [PATCH -next] crypto: aegis128 - Fix -Wunused-const-variable warning YueHaibing
@ 2019-08-30  8:24 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-08-30  8:24 UTC (permalink / raw)
  To: YueHaibing; +Cc: davem, linux-crypto, linux-kernel

On Thu, Aug 22, 2019 at 10:41:38PM +0800, YueHaibing wrote:
> 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>
> ---
>  crypto/aegis.h         | 11 -----------
>  crypto/aegis128-core.c | 11 +++++++++++
>  2 files changed, 11 insertions(+), 11 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-30  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 14:41 [PATCH -next] crypto: aegis128 - Fix -Wunused-const-variable warning YueHaibing
2019-08-30  8:24 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).