X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=crypto%2Fecc.h;h=1350e8eb6ac238d5bc67c785d4253fa887c587d8;hb=86406a9e733347f877a2bd5269ce7429d3748c6a;hp=a006132646a4389e74bdadb1a27ac998cea97993;hpb=04045c479a25b1cf76ee4d4a347d2a32e31cf909;p=linux-2.6-microblaze.git diff --git a/crypto/ecc.h b/crypto/ecc.h index a006132646a4..1350e8eb6ac2 100644 --- a/crypto/ecc.h +++ b/crypto/ecc.h @@ -27,6 +27,7 @@ #define _CRYPTO_ECC_H #include +#include /* One digit is u64 qword. */ #define ECC_CURVE_NIST_P192_DIGITS 3 @@ -46,13 +47,13 @@ * @out: Output array * @ndigits: Number of digits to copy */ -static inline void ecc_swap_digits(const u64 *in, u64 *out, unsigned int ndigits) +static inline void ecc_swap_digits(const void *in, u64 *out, unsigned int ndigits) { const __be64 *src = (__force __be64 *)in; int i; for (i = 0; i < ndigits; i++) - out[i] = be64_to_cpu(src[ndigits - 1 - i]); + out[i] = get_unaligned_be64(&src[ndigits - 1 - i]); } /**