Skip to content

Commit

Permalink
crypto: aegis128 - Fix -Wunused-const-variable warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
YueHaibing authored and herbertx committed Aug 30, 2019
1 parent 6796c02 commit f1d087b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 0 additions & 11 deletions crypto/aegis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
11 changes: 11 additions & 0 deletions crypto/aegis128-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1d087b

Please sign in to comment.