On Fri, 4 Oct 2013, Hans de Goede wrote:

> >> +  struct usb_host_endpoint *ep, *eps[USB_MAXENDPOINTS];
> >
> > That's a big array to put on the stack: 30 entries each containing 8
> > bytes (on a 64-bit arch).
> 
> I was wondering about this myself when I wrote this. What do you suggest
> as an alternative, kmalloc an array with 
> intf->cur_altsetting->desc.bNumEndpoints
> pointers ?

Or simply do 30 pointers every time.  240 bytes isn't all that much for
kmalloc.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to