From: Cyril Roelandt <tipecaml@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
balbi@ti.com, laurent.pinchart@ideasonboard.com,
kernel-janitors@vger.kernel.org,
Cyril Roelandt <tipecaml@gmail.com>
Subject: [PATCH v2] UVC: use GFP_ATOMIC under spin lock.
Date: Sun, 25 Nov 2012 02:58:19 +0100 [thread overview]
Message-ID: <1353808699-17224-1-git-send-email-tipecaml@gmail.com> (raw)
In-Reply-To: <50ADDDD5.1080709@bfs.de>
Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>
Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
drivers/usb/gadget/uvc_video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/uvc_video.c b/drivers/usb/gadget/uvc_video.c
index b0e53a8..cd067a6 100644
--- a/drivers/usb/gadget/uvc_video.c
+++ b/drivers/usb/gadget/uvc_video.c
@@ -309,7 +309,8 @@ uvc_video_pump(struct uvc_video *video)
video->encode(req, video, buf);
/* Queue the USB request */
- if ((ret = usb_ep_queue(video->ep, req, GFP_KERNEL)) < 0) {
+ ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
+ if (ret < 0) {
printk(KERN_INFO "Failed to queue request (%d)\n", ret);
usb_ep_set_halt(video->ep);
spin_unlock_irqrestore(&video->queue.irqlock, flags);
--
1.7.10.4
next prev parent reply other threads:[~2012-11-25 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 21:34 [PATCH] UVC: use GFP_ATOMIC under spin lock Cyril Roelandt
2012-11-22 8:09 ` walter harms
2012-11-22 12:22 ` Felipe Balbi
2012-11-22 12:38 ` Laurent Pinchart
2012-11-25 1:58 ` Cyril Roelandt [this message]
2012-11-27 13:14 ` [PATCH v2] " Laurent Pinchart
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=1353808699-17224-1-git-send-email-tipecaml@gmail.com \
--to=tipecaml@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).