From: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: leiming <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Adrian Bunk <bunk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Natalie Protasevich
<protasnb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Kernel Testers List
<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Network Development
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux ACPI <linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux PM List
<linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Linux SCSI List
<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
video4linux-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org,
mchehab-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org
Subject: Re: 2.6.30-rc2-git2: Reported regressions from 2.6.29
Date: Fri, 17 Apr 2009 19:55:29 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0904171952260.4042@localhost.localdomain> (raw)
In-Reply-To: <20090418103226.54250420@linux-lm>
On Sat, 18 Apr 2009, leiming wrote:
>
> >From 5715e310a939f3f7cd3e88eae8f25fedbb28def4 Mon Sep 17 00:00:00 2001
> From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Wed, 15 Apr 2009 22:32:51 +0800
> Subject: [PATCH] V4L/DVB:usbvideo:fix uvc resume failed
>
> Now urb buffers is not freed before suspend, so uvc_alloc_urb_buffers
> should return packet counts allocated originally during uvc resume
> , instead of zero.
>
> This patch is against v2.6.30-rc2.
>
> Signed-off-by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/media/video/uvc/uvc_video.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c
> index a95e173..c050b22 100644
> --- a/drivers/media/video/uvc/uvc_video.c
> +++ b/drivers/media/video/uvc/uvc_video.c
> @@ -742,7 +742,7 @@ static int uvc_alloc_urb_buffers(struct uvc_video_device *video,
>
> /* Buffers are already allocated, bail out. */
> if (video->urb_size)
> - return 0;
> + return DIV_ROUND_UP(video->urb_size, psize);
I don't think this is right. It should round _down_.
It's supposed to return 'npackets', but if you pass it a different packet
size than it was passed originally, it can now return a potentially bigger
number than the already allocated buffer, no?
So I think it should round down (ie use a regular divide). No?
Linuse
next prev parent reply other threads:[~2009-04-18 2:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 21:42 2.6.30-rc2-git2: Reported regressions from 2.6.29 Rafael J. Wysocki
2009-04-17 0:40 ` Linus Torvalds
2009-04-17 1:25 ` Ingo Molnar
[not found] ` <20090417012544.GB16126-X9Un+BFzKDI@public.gmane.org>
2009-04-17 21:25 ` Rafael J. Wysocki
2009-04-17 0:41 ` David Miller
2009-04-17 21:27 ` Rafael J. Wysocki
2009-04-17 0:46 ` Linus Torvalds
2009-04-17 21:31 ` Rafael J. Wysocki
2009-04-17 1:28 ` Jeff Chua
2009-04-17 1:30 ` Zhang Rui
2009-04-17 2:34 ` yakui_zhao
2009-04-17 21:35 ` Rafael J. Wysocki
2009-04-17 1:37 ` Ming Lei
2009-04-17 21:36 ` Rafael J. Wysocki
2009-04-17 23:56 ` Laurent Pinchart
[not found] ` <200904180156.24366.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-04-18 12:29 ` Rafael J. Wysocki
2009-04-18 2:32 ` leiming
2009-04-18 2:55 ` Linus Torvalds [this message]
2009-04-18 3:50 ` leiming
2009-04-18 4:51 ` leiming
2009-04-18 12:33 ` Rafael J. Wysocki
2009-04-20 20:08 ` Laurent Pinchart
[not found] ` <200904202208.23899.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-04-21 1:47 ` Ming Lei
2009-04-21 23:21 ` Laurent Pinchart
2009-05-09 3:28 ` Ming Lei
2009-05-09 16:24 ` Linus Torvalds
2009-05-09 21:37 ` Mauro Carvalho Chehab
2009-04-24 13:44 ` Kalle Valo
[not found] ` <87ljpqqi89.fsf-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-04-25 21:57 ` Rafael J. Wysocki
[not found] ` <200904170752.48078.edt@aei.ca>
[not found] ` <200904171648.38172.rjw@sisk.pl>
2009-04-26 13:35 ` Ed Tomlinson
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=alpine.LFD.2.00.0904171952260.4042@localhost.localdomain \
--to=torvalds-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=bunk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mchehab-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=protasnb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=video4linux-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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