[PATCH 01/10] USB: move snd_usb_pipe_sanity_check into the USB core

Takashi Iwai tiwai at suse.de
Thu Sep 3 08:40:34 CEST 2020


On Thu, 03 Sep 2020 02:45:53 +0200,
Alan Stern wrote:
> 
> In a few places here this check is completely unnecessary.  All it does 
> is verify that the device does have an endpoint 0 and the the type of 
> the endpoint matches the type of the pipe.  Well, every USB device 
> always has an endpoint 0, and it is always a bidirectional control 
> endpoint.  Therefore a simple static check is all you need: There's no 
> point calling usb_pipe_type_check() when the pipe is of the form 
> usb_{snd|rcv}ctrlpipe(dev, 0).
> 
> In short, this check should be removed completely; it does nothing.

Fair enough, but I think those removals should be in another patch.


thanks,

Takashi


More information about the Alsa-devel mailing list