summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorWeili Qian <qianweili@huawei.com>2023-02-09 13:36:14 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2023-02-14 06:39:33 +0100
commitf8de067cbe05a43a3de5d8873cd63c17abb1c7c8 (patch)
tree98cbe4ee638adff2891c9033be95a5adaec6675c /drivers/crypto
parentcrypto: hisilicon/qm - remove some unused defines (diff)
downloadlinux-f8de067cbe05a43a3de5d8873cd63c17abb1c7c8.tar.xz
linux-f8de067cbe05a43a3de5d8873cd63c17abb1c7c8.zip
crypto: hisilicon/qm - use min() instead of min_t()
'act_q_num = min_t(int, act_q_num, max_qp_num)', the type of 'act_q_num' and 'max_qp_num' are both 'u32', so use min() instead of min_t(). Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/hisilicon/qm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 547626718484..93b2f07b567d 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -3361,7 +3361,7 @@ static int qm_vf_q_assign(struct hisi_qm *qm, u32 num_vfs)
act_q_num = q_num;
}
- act_q_num = min_t(int, act_q_num, max_qp_num);
+ act_q_num = min(act_q_num, max_qp_num);
ret = hisi_qm_set_vft(qm, i, q_base, act_q_num);
if (ret) {
for (j = num_vfs; j > i; j--)