Skip to content

Commit 7d8807f

Browse files
Lotte-Baiintel-lab-lkp
authored andcommitted
s390: crypto: Use min() 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>
1 parent c65f677 commit 7d8807f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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(kb->head.len, keysize);
11131113
}
11141114

11151115
/* request cprb and payload */

0 commit comments

Comments
 (0)