From: Michal Nazarewicz <mina86@mina86.com>
To: Daniel Wagner <wagi@monom.org>, linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Daniel Wagner <daniel.wagner@bmw-carit.de>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] usb: gadget: f_fs: use complete() instead complete_all()
Date: Thu, 22 Sep 2016 16:22:57 +0200 [thread overview]
Message-ID: <xa1tponwxbcu.fsf@mina86.com> (raw)
In-Reply-To: <1474552313-29257-1-git-send-email-wagi@monom.org>
On Thu, Sep 22 2016, Daniel Wagner wrote:
> From: Daniel Wagner <daniel.wagner@bmw-carit.de>
>
> There is only one waiter for the completion, therefore there
> is no need to use complete_all(). Let's make that clear by
> using complete() instead of complete_all().
>
> The usage pattern of the completion is:
>
> waiter context waker context
> reinit_completion()
> usb_esp_queue()
> wait_for_completion_interruptible()
>
> ffs_ep0_complete()
> complete()
>
> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> Cc: Felipe Balbi <balbi@kernel.org>
> Cc: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> ---
> drivers/usb/gadget/function/f_fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index 5c8429f..0c29039 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -211,7 +211,7 @@ static void ffs_ep0_complete(struct usb_ep *ep, struct usb_request *req)
> {
> struct ffs_data *ffs = req->context;
>
> - complete_all(&ffs->ep0req_completion);
> + complete(&ffs->ep0req_completion);
> }
>
> static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
> --
> 2.7.4
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
prev parent reply other threads:[~2016-09-22 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 13:51 [PATCH] usb: gadget: f_fs: use complete() instead complete_all() Daniel Wagner
2016-09-22 14:22 ` Michal Nazarewicz [this message]
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=xa1tponwxbcu.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=balbi@kernel.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=wagi@monom.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.