All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
	Ville Syrjala <syrjala@sci.fi>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henk Vergonet <Henk.Vergonet@gmail.com>
Subject: [PATCH v3 3/9] Input: remove third argument of usb_maxpacket()
Date: Thu, 17 Mar 2022 01:19:29 +0900	[thread overview]
Message-ID: <20220316161935.2049-4-mailhol.vincent@wanadoo.fr> (raw)
In-Reply-To: <20220316161935.2049-1-mailhol.vincent@wanadoo.fr>

The third argument of usb_maxpacket(): in_out has been deprecated
because it could be derived from the second argument (e.g. using
usb_pipeout(pipe)).

N.B. function usb_maxpacket() was made variadic to accommodate the
transition from the old prototype with three arguments to the new one
with only two arguments (so that no renaming is needed). The variadic
argument is to be removed once all users of usb_maxpacket() get
migrated.

CC: Ville Syrjala <syrjala@sci.fi>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
 drivers/input/misc/ati_remote2.c         | 2 +-
 drivers/input/misc/cm109.c               | 2 +-
 drivers/input/misc/powermate.c           | 2 +-
 drivers/input/misc/yealink.c             | 2 +-
 drivers/input/tablet/acecad.c            | 2 +-
 drivers/input/tablet/pegasus_notetaker.c | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c
index 8a36d78fed63..946bf75aa106 100644
--- a/drivers/input/misc/ati_remote2.c
+++ b/drivers/input/misc/ati_remote2.c
@@ -639,7 +639,7 @@ static int ati_remote2_urb_init(struct ati_remote2 *ar2)
 			return -ENOMEM;
 
 		pipe = usb_rcvintpipe(udev, ar2->ep[i]->bEndpointAddress);
-		maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+		maxp = usb_maxpacket(udev, pipe);
 		maxp = maxp > 4 ? 4 : maxp;
 
 		usb_fill_int_urb(ar2->urb[i], udev, pipe, ar2->buf[i], maxp,
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c
index f515fae465c3..728325a2d574 100644
--- a/drivers/input/misc/cm109.c
+++ b/drivers/input/misc/cm109.c
@@ -745,7 +745,7 @@ static int cm109_usb_probe(struct usb_interface *intf,
 
 	/* get a handle to the interrupt data pipe */
 	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
-	ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	ret = usb_maxpacket(udev, pipe);
 	if (ret != USB_PKT_LEN)
 		dev_err(&intf->dev, "invalid payload size %d, expected %d\n",
 			ret, USB_PKT_LEN);
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c
index c4e0e1886061..c1c733a9cb89 100644
--- a/drivers/input/misc/powermate.c
+++ b/drivers/input/misc/powermate.c
@@ -374,7 +374,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
 
 	/* get a handle to the interrupt data pipe */
 	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(udev, pipe);
 
 	if (maxp < POWERMATE_PAYLOAD_SIZE_MIN || maxp > POWERMATE_PAYLOAD_SIZE_MAX) {
 		printk(KERN_WARNING "powermate: Expected payload of %d--%d bytes, found %d bytes!\n",
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 8ab01c7601b1..69420781db30 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -905,7 +905,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 
 	/* get a handle to the interrupt data pipe */
 	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
-	ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	ret = usb_maxpacket(udev, pipe);
 	if (ret != USB_PKT_LEN)
 		dev_err(&intf->dev, "invalid payload size %d, expected %zd\n",
 			ret, USB_PKT_LEN);
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index a38d1fe97334..56c7e471ac32 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -130,7 +130,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
 		return -ENODEV;
 
 	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
-	maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(dev, pipe);
 
 	acecad = kzalloc(sizeof(struct usb_acecad), GFP_KERNEL);
 	input_dev = input_allocate_device();
diff --git a/drivers/input/tablet/pegasus_notetaker.c b/drivers/input/tablet/pegasus_notetaker.c
index 749edbdb7ffa..c608ac505d1b 100644
--- a/drivers/input/tablet/pegasus_notetaker.c
+++ b/drivers/input/tablet/pegasus_notetaker.c
@@ -296,7 +296,7 @@ static int pegasus_probe(struct usb_interface *intf,
 	pegasus->intf = intf;
 
 	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
-	pegasus->data_len = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+	pegasus->data_len = usb_maxpacket(dev, pipe);
 
 	pegasus->data = usb_alloc_coherent(dev, pegasus->data_len, GFP_KERNEL,
 					   &pegasus->data_dma);
-- 
2.34.1


  parent reply	other threads:[~2022-03-16 16:19 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   ` Vincent Mailhol [this message]
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
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=20220316161935.2049-4-mailhol.vincent@wanadoo.fr \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=Henk.Vergonet@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=syrjala@sci.fi \
    /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.