1 From 9cfd2787b0b37940c656c6ea5fede6b3c360f0e5 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 060/124] crypto: x86/curve25519 - Remove unused carry
7 commit 054a5540fb8f7268e2c79e9deab4242db15c8cba upstream.
9 The carry variables are assigned but never used, which upsets
10 the compiler. This patch removes them.
12 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
13 Reviewed-by: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>
14 Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
15 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
18 arch/x86/crypto/curve25519-x86_64.c | 6 ++----
19 1 file changed, 2 insertions(+), 4 deletions(-)
21 --- a/arch/x86/crypto/curve25519-x86_64.c
22 +++ b/arch/x86/crypto/curve25519-x86_64.c
23 @@ -948,10 +948,8 @@ static void store_felem(u64 *b, u64 *f)
26 u64 top_bit0 = f30 >> (u32)63U;
34 @@ -970,11 +968,11 @@ static void store_felem(u64 *b, u64 *f)
37 f[3U] = f30 & (u64)0x7fffffffffffffffU;
38 - carry0 = add_scalar(f, f, (u64)19U * top_bit0);
39 + add_scalar(f, f, (u64)19U * top_bit0);
41 top_bit = f31 >> (u32)63U;
42 f[3U] = f31 & (u64)0x7fffffffffffffffU;
43 - carry = add_scalar(f, f, (u64)19U * top_bit);
44 + add_scalar(f, f, (u64)19U * top_bit);