From: Andrew Morton <akpm@linux-foundation.org>
To: Ming Lei <ming.lei@canonical.com>
Cc: linux-kernel@vger.kernel.org,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Tejun Heo <tj@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/2] lib/scatterlist: export sg_miter_skip()
Date: Thu, 31 Oct 2013 14:47:10 -0700 [thread overview]
Message-ID: <20131031144710.05c08d4a3258098af9312781@linux-foundation.org> (raw)
In-Reply-To: <1383062842-28453-1-git-send-email-ming.lei@canonical.com>
On Wed, 30 Oct 2013 00:07:22 +0800 Ming Lei <ming.lei@canonical.com> wrote:
> sg_copy_buffer() can't meet demand for some drrivers(such usb
> mass storage), so we have to use the sg_miter_* APIs to access
> sg buffer, then need export sg_miter_skip() for these drivers.
>
> The API is needed for converting to sg_miter_* APIs in USB storage
> driver for accessing sg buffer.
>
> ...
>
> --- a/include/linux/scatterlist.h
> +++ b/include/linux/scatterlist.h
> @@ -345,6 +345,7 @@ struct sg_mapping_iter {
>
> void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
> unsigned int nents, unsigned int flags);
> +bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset);
> bool sg_miter_next(struct sg_mapping_iter *miter);
> void sg_miter_stop(struct sg_mapping_iter *miter);
>
> diff --git a/lib/scatterlist.c b/lib/scatterlist.c
> index d16fa29..3a8e8e8 100644
> --- a/lib/scatterlist.c
> +++ b/lib/scatterlist.c
> @@ -495,7 +495,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter)
> * true if @miter contains the valid mapping. false if end of sg
> * list is reached.
> */
> -static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
> +bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
> {
> sg_miter_stop(miter);
>
> @@ -513,6 +513,7 @@ static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
>
> return true;
> }
> +EXPORT_SYMBOL(sg_miter_skip);
>
> /**
> * sg_miter_next - proceed mapping iterator to the next mapping
Looks OK to me. Please include this in whatever tree is used to merge
"[PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer".
next prev parent reply other threads:[~2013-10-31 21:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 16:07 Ming Lei
2013-10-31 21:47 ` Andrew Morton [this message]
2013-11-01 2:16 ` Ming Lei
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=20131031144710.05c08d4a3258098af9312781@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=ming.lei@canonical.com \
--cc=stern@rowland.harvard.edu \
--cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®