mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
iov_iter: add iter_iov_addr() and iter_iov_len() helpers
These just return the address and length of the current iovec segment in the iterator. Convert existing iov_iter_iovec() users to use them instead of getting a copy of the current vec. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -70,6 +70,8 @@ struct iov_iter {
|
||||
};
|
||||
|
||||
#define iter_iov(iter) (iter)->__iov
|
||||
#define iter_iov_addr(iter) (iter_iov(iter)->iov_base + (iter)->iov_offset)
|
||||
#define iter_iov_len(iter) (iter_iov(iter)->iov_len - (iter)->iov_offset)
|
||||
|
||||
static inline enum iter_type iov_iter_type(const struct iov_iter *i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user