diff --git a/crypto/ecc.c b/crypto/ecc.c index ed1237115066b48b368b15688e6b2343db70d6ac..ad739255951f01da1bf42ce68904a070084f97e2 100644 --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -906,10 +906,11 @@ static void ecc_point_mult(struct ecc_point *result, static inline void ecc_swap_digits(const u64 *in, u64 *out, unsigned int ndigits) { + const __be64 *src = (__force __be64 *)in; int i; for (i = 0; i < ndigits; i++) - out[i] = __swab64(in[ndigits - 1 - i]); + out[i] = be64_to_cpu(src[ndigits - 1 - i]); } static int __ecc_is_key_valid(const struct ecc_curve *curve,