From: Haowen Bai Date: Tue, 15 Mar 2022 08:01:04 +0000 (+0800) Subject: s390: crypto: Use min_t() instead of doing it manually X-Git-Tag: v6.6.17~7825^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f210fb39e4a79a3687964c2502784db8075e5e8;p=platform%2Fkernel%2Flinux-rpi.git s390: crypto: Use min_t() instead of doing it manually Fix following coccicheck warning: drivers/s390/crypto/zcrypt_ep11misc.c:1112:25-26: WARNING opportunity for min() Signed-off-by: Haowen Bai Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik --- diff --git a/drivers/s390/crypto/zcrypt_ep11misc.c b/drivers/s390/crypto/zcrypt_ep11misc.c index 9ce5a71..98d33f9 100644 --- a/drivers/s390/crypto/zcrypt_ep11misc.c +++ b/drivers/s390/crypto/zcrypt_ep11misc.c @@ -1109,7 +1109,7 @@ static int ep11_wrapkey(u16 card, u16 domain, if (kb->head.type == TOKTYPE_NON_CCA && kb->head.version == TOKVER_EP11_AES) { has_header = true; - keysize = kb->head.len < keysize ? kb->head.len : keysize; + keysize = min_t(size_t, kb->head.len, keysize); } /* request cprb and payload */