Skip to content

Commit 0f210fb

Browse files
Lotte-BaiVasily Gorbik
authored andcommitted
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>
1 parent f4272c0 commit 0f210fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/s390/crypto/zcrypt_ep11misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ static int ep11_wrapkey(u16 card, u16 domain,
11091109
if (kb->head.type == TOKTYPE_NON_CCA &&
11101110
kb->head.version == TOKVER_EP11_AES) {
11111111
has_header = true;
1112-
keysize = kb->head.len < keysize ? kb->head.len : keysize;
1112+
keysize = min_t(size_t, kb->head.len, keysize);
11131113
}
11141114

11151115
/* request cprb and payload */

0 commit comments

Comments
 (0)