summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2020-10-26 22:03:10 +0100
committerJens Axboe <axboe@kernel.dk>2020-10-29 15:55:45 +0100
commit1f41be7d4e90e36084037cecba5978b3d7f849db (patch)
tree12ed4266e705aac6a2156619df5183da16f5bf16 /lib
parentMerge tag 'nvme-5.10-2020-10-29' of git://git.infradead.org/nvme into block-5.10 (diff)
downloadlinux-1f41be7d4e90e36084037cecba5978b3d7f849db.tar.xz
linux-1f41be7d4e90e36084037cecba5978b3d7f849db.zip
lib/scatterlist: use consistent sg_copy_buffer() return type
sg_copy_buffer() returns a size_t with the number of bytes copied. Return 0 instead of false if the copy is skipped. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib')
-rw-r--r--lib/scatterlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 0a482ef988e5..a59778946404 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -933,7 +933,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
sg_miter_start(&miter, sgl, nents, sg_flags);
if (!sg_miter_skip(&miter, skip))
- return false;
+ return 0;
while ((offset < buflen) && sg_miter_next(&miter)) {
unsigned int len;