iov_iter: unify iterate_iovec and iterate_kvec
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 26 Apr 2021 03:57:42 +0000 (23:57 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Jun 2021 15:45:16 +0000 (11:45 -0400)
commit5c67aa90cd5c59912ee71cff879e8f1ab237ad88
tree35bd0d1b879a3ee9113372a5397143ab82209a25
parent7a1bcb5d255d4fd8b9725c3cf7ee0880a6369d2f
iov_iter: unify iterate_iovec and iterate_kvec

The differences between iterate_iovec and iterate_kvec are minor:
* kvec callback is treated as if it returned 0
* initialization of __p is with i->iov and i->kvec resp.
which is trivially dealt with.

No code generation changes - compiler is quite capable of turning
left = ((void)(STEP), 0);
__v.iov_len -= left;
(with no accesses to left downstream) and
(void)(STEP);
into the same code.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c