Skip to content

Commit 0464e0e

Browse files
ardbiesheuvelherbertx
authored andcommitted
crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd
Geert reports that builds where CONFIG_CRYPTO_AEGIS128_SIMD is not set may still emit references to crypto_aegis128_update_simd(), which cannot be satisfied and therefore break the build. These references only exist in functions that can be optimized away, but apparently, the compiler is not always able to prove this. So add some explicit checks for CONFIG_CRYPTO_AEGIS128_SIMD to help the compiler figure this out. Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 1069e97 commit 0464e0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crypto/aegis128-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void crypto_aegis128_update_a(struct aegis_state *state,
8989
const union aegis_block *msg,
9090
bool do_simd)
9191
{
92-
if (do_simd) {
92+
if (IS_ENABLED(CONFIG_CRYPTO_AEGIS128_SIMD) && do_simd) {
9393
crypto_aegis128_update_simd(state, msg);
9494
return;
9595
}
@@ -101,7 +101,7 @@ static void crypto_aegis128_update_a(struct aegis_state *state,
101101
static void crypto_aegis128_update_u(struct aegis_state *state, const void *msg,
102102
bool do_simd)
103103
{
104-
if (do_simd) {
104+
if (IS_ENABLED(CONFIG_CRYPTO_AEGIS128_SIMD) && do_simd) {
105105
crypto_aegis128_update_simd(state, msg);
106106
return;
107107
}

0 commit comments

Comments
 (0)