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

From: Takashi Iwai
Date: Thu Sep 03 2020 - 02:40:40 EST


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