linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: balbi@ti.com
Cc: walter harms <wharms@bfs.de>, Cyril Roelandt <tipecaml@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	gregkh@linuxfoundation.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] UVC: use GFP_ATOMIC under spin lock.
Date: Thu, 22 Nov 2012 13:38:20 +0100	[thread overview]
Message-ID: <1906481.9XLFQBE7QO@avalon> (raw)
In-Reply-To: <20121122122223.GC18022@arwen.pp.htv.fi>

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

On Thursday 22 November 2012 14:22:23 Felipe Balbi wrote:
> On Thu, Nov 22, 2012 at 09:09:57AM +0100, walter harms wrote:
> > Am 19.11.2012 22:34, schrieb Cyril Roelandt:
> > > 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 |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/usb/gadget/uvc_video.c
> > > b/drivers/usb/gadget/uvc_video.c index b0e53a8..79b4132 100644
> > > --- a/drivers/usb/gadget/uvc_video.c
> > > +++ b/drivers/usb/gadget/uvc_video.c
> > > @@ -309,7 +309,7 @@ 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) {
> > > +		if ((ret = usb_ep_queue(video->ep, req, GFP_ATOMIC)) < 0) {
> > > 
> > >  			printk(KERN_INFO "Failed to queue request (%d)\n", ret);
> > >  			usb_ep_set_halt(video->ep);
> > >  			spin_unlock_irqrestore(&video->queue.irqlock, flags);
> > 
> > IMHO, this should be two lines, aka:
> > 
> > ret = usb_ep_queue(video->ep, req, GFP_KERNEL);
> > if (ret<0)
> 
> correct, please resend with the fix.

I agree as well.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-11-22 19:11 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 [this message]
2012-11-25  1:58   ` [PATCH v2] " Cyril Roelandt
2012-11-27 13:14     ` 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=1906481.9XLFQBE7QO@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tipecaml@gmail.com \
    --cc=wharms@bfs.de \
    /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).