diff options
author | 2022-03-15 16:01:04 +0800 | |
---|---|---|
committer | 2022-03-27 22:18:38 +0200 | |
commit | 0f210fb39e4a79a3687964c2502784db8075e5e8 (patch) | |
tree | e17a726c7b7818dba97bcfd54e411cac608fd5df /drivers/s390 | |
parent | s390/pkey: fix typos in comments (diff) | |
download | linux-0f210fb39e4a79a3687964c2502784db8075e5e8.tar.gz linux-0f210fb39e4a79a3687964c2502784db8075e5e8.tar.bz2 linux-0f210fb39e4a79a3687964c2502784db8075e5e8.zip |
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 <baihaowen@meizu.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/crypto/zcrypt_ep11misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_ep11misc.c b/drivers/s390/crypto/zcrypt_ep11misc.c index 9ce5a71da69b..98d33f932b0b 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 */ |