Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Haowen Bai and committed by
Vasily Gorbik
0f210fb3 f4272c03

+1 -1
+1 -1
drivers/s390/crypto/zcrypt_ep11misc.c
··· 1109 1109 if (kb->head.type == TOKTYPE_NON_CCA && 1110 1110 kb->head.version == TOKVER_EP11_AES) { 1111 1111 has_header = true; 1112 - keysize = kb->head.len < keysize ? kb->head.len : keysize; 1112 + keysize = min_t(size_t, kb->head.len, keysize); 1113 1113 } 1114 1114 1115 1115 /* request cprb and payload */