Remove the while loop that can never be entered.
Signed-off-by: Qi Tao taoqi10@huawei.com --- drv/isa_ce_sm4.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/drv/isa_ce_sm4.c b/drv/isa_ce_sm4.c index 0e19818..ceaefeb 100644 --- a/drv/isa_ce_sm4.c +++ b/drv/isa_ce_sm4.c @@ -68,12 +68,6 @@ static void sm4_v8_ctr32_encrypt(__u8 *in, __u8 *out, __u32 ctr32; __u32 n = 0;
- while (n && len) { - *(out++) = *(in++) ^ ecount_buf[n]; - --len; - n = (n + 1) % SM4_BLOCK_SIZE; - } - ctr32 = GETU32(iv + INCREASE_BYTES); while (len >= SM4_BLOCK_SIZE) { blocks = len / SM4_BLOCK_SIZE;