aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2023-12-24 10:21:41 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-29 11:25:56 +0800
commit1eece9c6de22fb24d77328d0c74b7c507f1c958a (patch)
tree43b900ed61783854cd0221eabc8f93e9195d1ecd /drivers/crypto
parent2548c7a9088c8e06d9d4251e22abd756236d02e4 (diff)
downloadlinux-1eece9c6de22fb24d77328d0c74b7c507f1c958a.tar.gz
crypto: sahara - remove 'active' flag from sahara_aes_reqctx struct
The 'active' flag is only used to indirectly set the 'first' flag. Drop the 'active' flag and set 'first' directly in sahara_sha_init(). Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sahara.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 253a3dafdff1ae..cd14514a43bb96 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -168,7 +168,6 @@ struct sahara_aes_reqctx {
* @total: total number of bytes for transfer
* @last: is this the last block
* @first: is this the first block
- * @active: inside a transfer
*/
struct sahara_sha_reqctx {
u8 buf[SAHARA_MAX_SHA_BLOCK_SIZE];
@@ -184,7 +183,6 @@ struct sahara_sha_reqctx {
size_t total;
unsigned int last;
unsigned int first;
- unsigned int active;
};
struct sahara_dev {
@@ -1053,11 +1051,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last)
rctx->last = last;
- if (!rctx->active) {
- rctx->active = 1;
- rctx->first = 1;
- }
-
spin_lock_bh(&dev->queue_spinlock);
ret = crypto_enqueue_request(&dev->queue, &req->base);
spin_unlock_bh(&dev->queue_spinlock);
@@ -1088,7 +1081,7 @@ static int sahara_sha_init(struct ahash_request *req)
}
rctx->context_size = rctx->digest_size + 4;
- rctx->active = 0;
+ rctx->first = 1;
return 0;
}