diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-10 12:17:54 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 18:43:43 +0800 |
commit | 7aa2493040d5afc954ef4622598e425b2ec3ad16 (patch) | |
tree | f3669648e9aee0bde223ffd6c2f9e8e8abf4766e | |
parent | a7432240904dd778e75da60c879a501b3036a57e (diff) | |
download | linux-crypto-7aa2493040d5afc954ef4622598e425b2ec3ad16.tar.gz linux-crypto-7aa2493040d5afc954ef4622598e425b2ec3ad16.zip |
crypto: streebog - use correct endianness type
streebog_uint512::qword needs to be __le64, not u64. This fixes a large
number of sparse warnings:
crypto/streebog_generic.c:25:9: warning: incorrect type in initializer (different base types)
crypto/streebog_generic.c:25:9: expected unsigned long long
crypto/streebog_generic.c:25:9: got restricted __le64 [usertype]
[omitted many similar warnings]
No actual change in behavior.
Cc: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/streebog_generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/streebog_generic.c b/crypto/streebog_generic.c index 03272a22..5a2eafed 100644 --- a/crypto/streebog_generic.c +++ b/crypto/streebog_generic.c @@ -960,7 +960,7 @@ static int streebog_init(struct shash_desc *desc) memset(ctx, 0, sizeof(struct streebog_state)); for (i = 0; i < 8; i++) { if (digest_size == STREEBOG256_DIGEST_SIZE) - ctx->h.qword[i] = 0x0101010101010101ULL; + ctx->h.qword[i] = cpu_to_le64(0x0101010101010101ULL); } return 0; } |