Re: patch usb-add-urb_free_buffer-flag-and-the-logic-behind-it.patch added to gregkh-2.6 tree

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, Jun 25, 2007 at 11:59:17PM +0200, Marcel Holtmann wrote:
> Hi Pete,
> 
> > >      usb-add-urb_free_buffer-flag-and-the-logic-behind-it.patch
> > 
> > > +++ b/drivers/usb/core/urb.c
> > > @@ -13,6 +13,9 @@ static void urb_destroy(struct kref *kre
> > >  {
> > >  	struct urb *urb = to_urb(kref);
> > >  
> > > +	if (urb->transfer_flags & URB_FREE_BUFFER)
> > > +		kfree(urb->transfer_buffer);
> > > +
> > >  	kfree(urb);
> > 
> > I liked the constructors which kept the URB_FREE_BUFFER outside of grabby
> > little hands of drivers, but this is good too, I suppose. I'm going to
> > use this right away. Marcel, please let me know if I'm doing it wrong.
> 
> actually it seems that Greg didn't like the extra helpers for even
> allocating the buffers. We can always add them later.

I didn't like it as you were not just using kmalloc() which is what the
majority of the drivers should be using.

If you want to rework it and use kmalloc, I have no objection to it at
all, and would switch a bunch of my drivers over to it.

Heck, I'm going to convert things already to use this, it's much nicer
already :)

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.