From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core patches for 2.6.7
Date: Tue, 22 Jun 2004 10:41:53 -0700 [thread overview]
Message-ID: <10879261132464@kroah.com> (raw)
In-Reply-To: <10879261133723@kroah.com>
ChangeSet 1.1825, 2004/06/22 09:20:30-07:00, greg@kroah.com
[PATCH] USB: sparse fixups for devio.c
drivers/usb/core/devio.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c Tue Jun 22 09:46:22 2004
+++ b/drivers/usb/core/devio.c Tue Jun 22 09:46:22 2004
@@ -290,8 +290,11 @@
spin_lock_irqsave(&ps->lock, flags);
}
spin_unlock_irqrestore(&ps->lock, flags);
- while ((as = async_getcompleted(ps)))
+ as = async_getcompleted(ps);
+ while (as) {
free_async(as);
+ as = async_getcompleted(ps);
+ }
}
static void destroy_async_on_interface (struct dev_state *ps, unsigned int ifnum)
@@ -968,29 +971,27 @@
static int processcompl(struct async *as)
{
struct urb *urb = as->urb;
+ struct usbdevfs_urb __user *userurb = as->userurb;
unsigned int i;
if (as->userbuffer)
if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
return -EFAULT;
- if (put_user(urb->status,
- &((struct usbdevfs_urb *)as->userurb)->status))
+ if (put_user(urb->status, &userurb->status))
return -EFAULT;
- if (put_user(urb->actual_length,
- &((struct usbdevfs_urb *)as->userurb)->actual_length))
+ if (put_user(urb->actual_length, &userurb->actual_length))
return -EFAULT;
- if (put_user(urb->error_count,
- &((struct usbdevfs_urb *)as->userurb)->error_count))
+ if (put_user(urb->error_count, &userurb->error_count))
return -EFAULT;
if (!(usb_pipeisoc(urb->pipe)))
return 0;
for (i = 0; i < urb->number_of_packets; i++) {
if (put_user(urb->iso_frame_desc[i].actual_length,
- &((struct usbdevfs_urb *)as->userurb)->iso_frame_desc[i].actual_length))
+ &userurb->iso_frame_desc[i].actual_length))
return -EFAULT;
if (put_user(urb->iso_frame_desc[i].status,
- &((struct usbdevfs_urb *)as->userurb)->iso_frame_desc[i].status))
+ &userurb->iso_frame_desc[i].status))
return -EFAULT;
}
return 0;
next prev parent reply other threads:[~2004-06-22 19:08 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 17:19 [BK PATCH] Driver Core patches for 2.6.7 Greg KH
2004-06-22 17:41 ` [PATCH] " Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH
2004-06-22 17:41 ` Greg KH [this message]
2004-06-22 17:41 ` Greg KH
2004-06-22 23:21 ` Dmitry Torokhov
2004-06-22 23:31 ` Greg KH
2004-06-22 23:44 ` Dmitry Torokhov
2004-06-22 23:51 ` Greg KH
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=10879261132464@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@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