1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Herbert Xu <herbert@gondor.apana.org.au>
3 Date: Thu, 23 Jul 2020 17:50:48 +1000
4 Subject: [PATCH] crypto: x86/curve25519 - Remove unused carry variables
6 commit 054a5540fb8f7268e2c79e9deab4242db15c8cba upstream.
8 The carry variables are assigned but never used, which upsets
9 the compiler. This patch removes them.
11 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
12 Reviewed-by: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>
13 Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
14 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
17 arch/x86/crypto/curve25519-x86_64.c | 6 ++----
18 1 file changed, 2 insertions(+), 4 deletions(-)
20 --- a/arch/x86/crypto/curve25519-x86_64.c
21 +++ b/arch/x86/crypto/curve25519-x86_64.c
22 @@ -948,10 +948,8 @@ static void store_felem(u64 *b, u64 *f)
25 u64 top_bit0 = f30 >> (u32)63U;
33 @@ -970,11 +968,11 @@ static void store_felem(u64 *b, u64 *f)
36 f[3U] = f30 & (u64)0x7fffffffffffffffU;
37 - carry0 = add_scalar(f, f, (u64)19U * top_bit0);
38 + add_scalar(f, f, (u64)19U * top_bit0);
40 top_bit = f31 >> (u32)63U;
41 f[3U] = f31 & (u64)0x7fffffffffffffffU;
42 - carry = add_scalar(f, f, (u64)19U * top_bit);
43 + add_scalar(f, f, (u64)19U * top_bit);