diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-10 23:17:52 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 13:43:42 +0300 |
commit | 18666550f4c51e331551682d358dcfe3aca76a37 (patch) | |
tree | 61fe1e070e18319d09d52ec0639d74c3b8854ca8 /crypto | |
parent | 707d0cf8f7cff6dfee9197002859912310532c4f (diff) | |
download | linux-18666550f4c51e331551682d358dcfe3aca76a37.tar.xz |
crypto: gcm - use correct endianness type in gcm_hash_len()
In gcm_hash_len(), use be128 rather than u128. This fixes the following
sparse warnings:
crypto/gcm.c:252:19: warning: incorrect type in assignment (different base types)
crypto/gcm.c:252:19: expected unsigned long long [usertype] a
crypto/gcm.c:252:19: got restricted __be64 [usertype]
crypto/gcm.c:253:19: warning: incorrect type in assignment (different base types)
crypto/gcm.c:253:19: expected unsigned long long [usertype] b
crypto/gcm.c:253:19: got restricted __be64 [usertype]
No actual change in behavior.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/gcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/gcm.c b/crypto/gcm.c index e438492db2ca..bbce31f6199b 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -247,7 +247,7 @@ static int gcm_hash_len(struct aead_request *req, u32 flags) struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct ahash_request *ahreq = &pctx->u.ahreq; struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; - u128 lengths; + be128 lengths; lengths.a = cpu_to_be64(req->assoclen * 8); lengths.b = cpu_to_be64(gctx->cryptlen * 8); |