Re: [PATCH v4 0/9] usb: rework usb_maxpacket() and remove its third argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 17, 2022 at 12:55:05PM +0900, Vincent Mailhol wrote:
> This series rework usb_maxpacket() to change its prototype from:
> | static inline __u16
> | usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
> 
> into:
> | static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
> 
> and rewrite the function using usb_pipe_endpoint().
> 
> Rationale:
> 
>   * The third argument of usb_maxpacket(): is_out can be derived from
>     its second one: pipe using usb_pipeout(pipe). Furthermore,
>     usb_pipeout(pipe) is being called within usb_maxpacket()
>     regardless to confirm the input.
> 
>   * This function is not exposed to the UAPI so return type should be
>     u16, not __u16.
> 
>   * usb_pipe_endpoint() (defined a couple of lines before) does most
>     of the work. Use it instead of reimplementing the same thing
>     again.
> 
> In order to do so, usb_maxpacket() is temporarily changed into a variadic
> function to ignore its third argument.
> 
> The series goes as follow:
> 
>     * Patch 1: make usb_maxpacket() variadic to accommodate during the
>       migration
> 
>     * Patch 2 to 7: migrate all the users of usb_maxpacket() (one
>       patch per tree)
> 
>     * Patch 8: remove the third argument of usb_maxpacket() now that
>       everyone is migrated
> 
>     * Patch 9: rework usb_maxpacket()'s body using usb_pipe_endpoint()

Now queued up, thanks for sticking with this!

Can you send the follow-up patch that removes the vararg?  I'll keep
that in my tree to try to catch any remaining things that come in and
get it merged when it's ok to.

thanks,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux