Skip to content

Commit 1eece9c

Browse files
opanait-wrherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 2548c7a commit 1eece9c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/crypto/sahara.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ struct sahara_aes_reqctx {
168168
* @total: total number of bytes for transfer
169169
* @last: is this the last block
170170
* @first: is this the first block
171-
* @active: inside a transfer
172171
*/
173172
struct sahara_sha_reqctx {
174173
u8 buf[SAHARA_MAX_SHA_BLOCK_SIZE];
@@ -184,7 +183,6 @@ struct sahara_sha_reqctx {
184183
size_t total;
185184
unsigned int last;
186185
unsigned int first;
187-
unsigned int active;
188186
};
189187

190188
struct sahara_dev {
@@ -1053,11 +1051,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last)
10531051

10541052
rctx->last = last;
10551053

1056-
if (!rctx->active) {
1057-
rctx->active = 1;
1058-
rctx->first = 1;
1059-
}
1060-
10611054
spin_lock_bh(&dev->queue_spinlock);
10621055
ret = crypto_enqueue_request(&dev->queue, &req->base);
10631056
spin_unlock_bh(&dev->queue_spinlock);
@@ -1088,7 +1081,7 @@ static int sahara_sha_init(struct ahash_request *req)
10881081
}
10891082

10901083
rctx->context_size = rctx->digest_size + 4;
1091-
rctx->active = 0;
1084+
rctx->first = 1;
10921085

10931086
return 0;
10941087
}

0 commit comments

Comments
 (0)