From: Thorsten Blum Date: Thu, 14 May 2026 16:55:10 +0000 (+0200) Subject: crypto: riscv/aes - replace min_t with min in riscv64_aes_ctr_crypt X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fc2d791a43d3880496d1c729b8bd74d2c19cb4e7;p=thirdparty%2Fkernel%2Flinux.git crypto: riscv/aes - replace min_t with min in riscv64_aes_ctr_crypt Use the simpler min() macro since the values are unsigned and compatible. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu --- diff --git a/arch/riscv/crypto/aes-riscv64-glue.c b/arch/riscv/crypto/aes-riscv64-glue.c index 8bbf7f348c233..bbd920c9e29d1 100644 --- a/arch/riscv/crypto/aes-riscv64-glue.c +++ b/arch/riscv/crypto/aes-riscv64-glue.c @@ -19,6 +19,7 @@ #include #include #include +#include #include asmlinkage void aes_ecb_encrypt_zvkned(const struct crypto_aes_ctx *key, @@ -266,8 +267,7 @@ static int riscv64_aes_ctr_crypt(struct skcipher_request *req) * operation into two at the point where the overflow * will occur. After the first part, add the carry bit. */ - p1_nbytes = min_t(unsigned int, nbytes, - (nblocks - ctr32) * AES_BLOCK_SIZE); + p1_nbytes = min(nbytes, (nblocks - ctr32) * AES_BLOCK_SIZE); aes_ctr32_crypt_zvkned_zvkb(ctx, walk.src.virt.addr, walk.dst.virt.addr, p1_nbytes, req->iv);