summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-09-15 20:25:47 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2022-11-25 13:01:55 -0500
commitf253e94a1fc356a3674b9eb5f35b828b6a83f8da (patch)
treef59d6407c88704e01e7db801cca01eed55fa83b2
parentcfbd0180a9d6cf8001828444a70aee8ad6466c0b (diff)
downloadlinux-crypto-f253e94a1fc356a3674b9eb5f35b828b6a83f8da.tar.gz
linux-crypto-f253e94a1fc356a3674b9eb5f35b828b6a83f8da.zip
use less confusing names for iov_iter direction initializers
READ/WRITE proved to be actively confusing - the meanings are "data destination, as used with read(2)" and "data source, as used with write(2)", but people keep interpreting those as "we read data from it" and "we write data to it", i.e. exactly the wrong way. Call them ITER_DEST and ITER_SOURCE - at least that is harder to misinterpret... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--crypto/testmgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index bcd059ca..814d2dc8 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -766,7 +766,7 @@ static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls,
struct iov_iter input;
int err;
- iov_iter_kvec(&input, WRITE, inputs, nr_inputs, src_total_len);
+ iov_iter_kvec(&input, ITER_SOURCE, inputs, nr_inputs, src_total_len);
err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask,
cfg->inplace_mode != OUT_OF_PLACE ?
max(dst_total_len, src_total_len) :
@@ -1180,7 +1180,7 @@ static int build_hash_sglist(struct test_sglist *tsgl,
kv.iov_base = (void *)vec->plaintext;
kv.iov_len = vec->psize;
- iov_iter_kvec(&input, WRITE, &kv, 1, vec->psize);
+ iov_iter_kvec(&input, ITER_SOURCE, &kv, 1, vec->psize);
return build_test_sglist(tsgl, cfg->src_divs, alignmask, vec->psize,
&input, divs);
}