From: David Disseldorp <ddiss@suse.de>
To: linux-block@vger.kernel.org
Cc: axboe@kernel.dk, David Disseldorp <ddiss@suse.de>,
Douglas Gilbert <dgilbert@interlog.com>
Subject: [PATCH] lib/scatterlist: use consistent sg_copy_buffer() return type
Date: Mon, 26 Oct 2020 22:03:10 +0100 [thread overview]
Message-ID: <20201026210310.30169-1-ddiss@suse.de> (raw)
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>
---
lib/scatterlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.26.2
next reply other threads:[~2020-10-26 21:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 21:03 David Disseldorp [this message]
2020-10-29 14:52 ` [PATCH] lib/scatterlist: use consistent sg_copy_buffer() return type David Disseldorp
2020-10-29 14:54 ` Johannes Thumshirn
2020-10-29 14:56 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201026210310.30169-1-ddiss@suse.de \
--to=ddiss@suse.de \
--cc=axboe@kernel.dk \
--cc=dgilbert@interlog.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.