diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2021-06-17 11:00:12 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-06-24 09:51:35 +0300 |
commit | b20d9a73a3b2a859d32ae569588557bc47c87a1e (patch) | |
tree | 01c74bac18a1245072d7180d0f130176e12de2f4 /drivers/crypto/nx/nx-aes-ccm.c | |
parent | 2a96726bd0ccde4f12b9b9a9f61f7b1ac5af7e10 (diff) | |
download | linux-b20d9a73a3b2a859d32ae569588557bc47c87a1e.tar.xz |
crypto: nx - Fix numerous sparse byte-order warnings
The nx driver started out its life as a BE-only driver. However,
somewhere along the way LE support was partially added. This never
seems to have been extended all the way but it does trigger numerous
warnings during build.
This patch fixes all those warnings, but it doesn't mean that the
driver will work on LE.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx/nx-aes-ccm.c')
-rw-r--r-- | drivers/crypto/nx/nx-aes-ccm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx-aes-ccm.c b/drivers/crypto/nx/nx-aes-ccm.c index e7384d107573..3793885f928d 100644 --- a/drivers/crypto/nx/nx-aes-ccm.c +++ b/drivers/crypto/nx/nx-aes-ccm.c @@ -391,7 +391,7 @@ static int ccm_nx_decrypt(struct aead_request *req, /* update stats */ atomic_inc(&(nx_ctx->stats->aes_ops)); - atomic64_add(csbcpb->csb.processed_byte_count, + atomic64_add(be32_to_cpu(csbcpb->csb.processed_byte_count), &(nx_ctx->stats->aes_bytes)); processed += to_process; @@ -460,7 +460,7 @@ static int ccm_nx_encrypt(struct aead_request *req, /* update stats */ atomic_inc(&(nx_ctx->stats->aes_ops)); - atomic64_add(csbcpb->csb.processed_byte_count, + atomic64_add(be32_to_cpu(csbcpb->csb.processed_byte_count), &(nx_ctx->stats->aes_bytes)); processed += to_process; |