All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v4 0/9] usb: rework usb_maxpacket() and remove its third argument
Date: Fri, 22 Apr 2022 23:00:35 +0900	[thread overview]
Message-ID: <CAMZ6RqKhJ5aypM+dBF38nL626PDdD-gr2AHJz1ozpov+OSzbAw@mail.gmail.com> (raw)
In-Reply-To: <YmKv37an0DR7/iPE@kroah.com>

On Fri. 22 Apr. 2022 at 22:38, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> 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!

Thanks to you for your patience and explanations!

> 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.

It is this patch:
https://lore.kernel.org/linux-usb/20220317035514.6378-9-mailhol.vincent@wanadoo.fr/

Or do you prefer me to resend it on the mailing list?


Yours sincerely,
Vincent Mailhol

  reply	other threads:[~2022-04-22 14:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 10:53 [PATCH] usb: rework usb_maxpacket() and remove its third argument Vincent Mailhol
2022-03-04 14:20 ` Greg Kroah-Hartman
2022-03-04 17:23   ` Vincent MAILHOL
2022-03-04 17:32     ` Greg Kroah-Hartman
2022-03-06  7:55 ` [PATCH v2 00/10] " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 01/10] usb: oxu210hp-hcd: remove redundant call to max_packet() macro Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 02/10] usb: isp1760: remove redundant " Vincent Mailhol
2022-03-06 19:49     ` Rui Miguel Silva
2022-03-06  7:55   ` [PATCH v2 03/10] usb: rework usb_maxpacket() and deprecate its third argument Vincent Mailhol
2022-03-15 17:25     ` Greg Kroah-Hartman
2022-03-16  1:41       ` Vincent MAILHOL
2022-03-06  7:55   ` [PATCH v2 04/10] HID: usbhid: remove third argument of usb_maxpacket() Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 05/10] Input: " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 06/10] media: " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 07/10] net: " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 08/10] usb: " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 09/10] sound: " Vincent Mailhol
2022-03-06  7:55   ` [PATCH v2 10/10] " Vincent Mailhol
2022-03-16 16:19 ` [PATCH v3 0/9] usb: rework usb_maxpacket() and remove its third argument Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 1/9] usb: deprecate the third argument of usb_maxpacket() Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 2/9] HID: usbhid: remove " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 3/9] Input: " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 4/9] media: " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 5/9] net: " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 6/9] usb: " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 7/9] sound: " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 8/9] " Vincent Mailhol
2022-03-16 16:19   ` [PATCH v3 9/9] usb: rework usb_maxpacket() using usb_pipe_endpoint() Vincent Mailhol
2022-03-16 17:17     ` Alan Stern
2022-03-16 23:26       ` Vincent MAILHOL
2022-03-17  3:55 ` [PATCH v4 0/9] usb: rework usb_maxpacket() and remove its third argument Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 1/9] usb: deprecate the third argument of usb_maxpacket() Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 2/9] HID: usbhid: remove " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 3/9] Input: " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 4/9] media: " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 5/9] net: " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 6/9] usb: " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 7/9] sound: " Vincent Mailhol
2022-03-22 13:22     ` Takashi Iwai
2022-03-17  3:55   ` [PATCH v4 8/9] " Vincent Mailhol
2022-03-17  3:55   ` [PATCH v4 9/9] usb: rework usb_maxpacket() using usb_pipe_endpoint() Vincent Mailhol
2022-04-22 13:38   ` [PATCH v4 0/9] usb: rework usb_maxpacket() and remove its third argument Greg Kroah-Hartman
2022-04-22 14:00     ` Vincent MAILHOL [this message]
2022-04-22 14:07       ` Vincent MAILHOL
2022-04-22 14:19         ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMZ6RqKhJ5aypM+dBF38nL626PDdD-gr2AHJz1ozpov+OSzbAw@mail.gmail.com \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.