[alsa-devel] [PATCH 6/9] ALSA: usb: caiaq: use usb_fill_int_urb()

Daniel Mack daniel at zonque.org
Fri Jun 22 12:01:13 CEST 2018


On Thursday, June 21, 2018 11:16 PM, Sebastian Andrzej Siewior wrote:
> On 2018-06-21 22:19:32 [+0200], Daniel Mack wrote:
>> On Tuesday, June 19, 2018 11:55 PM, Sebastian Andrzej Siewior wrote:
>>> Using usb_fill_int_urb() helps to find code which initializes an
>>> URB. A grep for members of the struct (like ->complete) reveal lots
>>> of other things, too.
>>
>> Acked-by: Daniel Mack <zonque at gmail.com>
> 
> nope, please don't.
> Takashi, please ignore the usb_fill_.* patches. I will be doing another
> spin with usb_fill_iso_urb() instead.

Hmm, there is no such thing as usb_fill_iso_urb() in my tree, are you 
going to add that?

The only part that needs attention is the interval parameter, which is 
passed to usb_fill_int_urb() as 1 now, and hence urb->interval will also 
be 1, just like the open-coded version before. Unless I miss anything, 
your conversion should work, but I haven't tested it yet.

But I agree the function name is misleading, so we should probably get a 
usb_fill_iso_urb() and use it where appropriate. AFAICS, it will be 
identical to usb_fill_bulk_urb(), as the endpoint type is encoded in the 
pipe. Maybe it's worth adding a check?


Thanks,
Daniel


More information about the Alsa-devel mailing list