linux-usb.vger.kernel.org archive mirror
 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>,
	Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Benjamin Valentin <benpicco@googlemail.com>
Subject: [PATCH v4 4/9] media: remove third argument of usb_maxpacket()
Date: Thu, 17 Mar 2022 12:55:09 +0900	[thread overview]
Message-ID: <20220317035514.6378-5-mailhol.vincent@wanadoo.fr> (raw)
In-Reply-To: <20220317035514.6378-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: Sean Young <sean@mess.org>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Benjamin Valentin <benpicco@googlemail.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
 drivers/media/rc/ati_remote.c           | 4 ++--
 drivers/media/rc/mceusb.c               | 2 +-
 drivers/media/rc/streamzap.c            | 2 +-
 drivers/media/rc/xbox_remote.c          | 2 +-
 drivers/media/usb/tm6000/tm6000-dvb.c   | 2 +-
 drivers/media/usb/tm6000/tm6000-input.c | 2 +-
 drivers/media/usb/tm6000/tm6000-video.c | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index c12dda73cdd5..3155e876616d 100644
--- a/drivers/media/rc/ati_remote.c
+++ b/drivers/media/rc/ati_remote.c
@@ -773,7 +773,7 @@ static int ati_remote_initialize(struct ati_remote *ati_remote)
 
 	/* Set up irq_urb */
 	pipe = usb_rcvintpipe(udev, ati_remote->endpoint_in->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(udev, pipe);
 	maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
 	usb_fill_int_urb(ati_remote->irq_urb, udev, pipe, ati_remote->inbuf,
@@ -784,7 +784,7 @@ static int ati_remote_initialize(struct ati_remote *ati_remote)
 
 	/* Set up out_urb */
 	pipe = usb_sndintpipe(udev, ati_remote->endpoint_out->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(udev, pipe);
 	maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
 	usb_fill_int_urb(ati_remote->out_urb, udev, pipe, ati_remote->outbuf,
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 2dc810f5a73f..0834d5f866fd 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -1728,7 +1728,7 @@ static int mceusb_dev_probe(struct usb_interface *intf,
 		pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress);
 	else
 		pipe = usb_rcvbulkpipe(dev, ep_in->bEndpointAddress);
-	maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(dev, pipe);
 
 	ir = kzalloc(sizeof(struct mceusb_dev), GFP_KERNEL);
 	if (!ir)
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index 16ba85d7c090..deb85330c940 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -307,7 +307,7 @@ static int streamzap_probe(struct usb_interface *intf,
 	}
 
 	pipe = usb_rcvintpipe(usbdev, endpoint->bEndpointAddress);
-	maxp = usb_maxpacket(usbdev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(usbdev, pipe);
 
 	if (maxp == 0) {
 		dev_err(&intf->dev, "%s: endpoint Max Packet Size is 0!?!\n",
diff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c
index 98d0b43608ad..7424b2031152 100644
--- a/drivers/media/rc/xbox_remote.c
+++ b/drivers/media/rc/xbox_remote.c
@@ -171,7 +171,7 @@ static int xbox_remote_initialize(struct xbox_remote *xbox_remote,
 
 	/* Set up irq_urb */
 	pipe = usb_rcvintpipe(udev, endpoint_in->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+	maxp = usb_maxpacket(udev, pipe);
 	maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;
 
 	usb_fill_int_urb(xbox_remote->irq_urb, udev, pipe, xbox_remote->inbuf,
diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c
index 4990fa886d7a..335f747b0375 100644
--- a/drivers/media/usb/tm6000/tm6000-dvb.c
+++ b/drivers/media/usb/tm6000/tm6000-dvb.c
@@ -120,7 +120,7 @@ static int tm6000_start_stream(struct tm6000_core *dev)
 	pipe = usb_rcvbulkpipe(dev->udev, dev->bulk_in.endp->desc.bEndpointAddress
 							  & USB_ENDPOINT_NUMBER_MASK);
 
-	size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+	size = usb_maxpacket(dev->udev, pipe);
 	size = size * 15; /* 512 x 8 or 12 or 15 */
 
 	dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL);
diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c
index 84602edf3fe8..5136e9e202f1 100644
--- a/drivers/media/usb/tm6000/tm6000-input.c
+++ b/drivers/media/usb/tm6000/tm6000-input.c
@@ -340,7 +340,7 @@ static int __tm6000_ir_int_start(struct rc_dev *rc)
 		dev->int_in.endp->desc.bEndpointAddress
 		& USB_ENDPOINT_NUMBER_MASK);
 
-	size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+	size = usb_maxpacket(dev->udev, pipe);
 	dprintk(1, "IR max size: %d\n", size);
 
 	ir->int_urb->transfer_buffer = kzalloc(size, GFP_ATOMIC);
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
index e293f6f3d1bc..d855a19551f3 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -570,7 +570,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)
 			       dev->isoc_in.endp->desc.bEndpointAddress &
 			       USB_ENDPOINT_NUMBER_MASK);
 
-	size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
+	size = usb_maxpacket(dev->udev, pipe);
 
 	if (size > dev->isoc_in.maxsize)
 		size = dev->isoc_in.maxsize;
-- 
2.34.1


  parent reply	other threads:[~2022-03-17  5:17 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   ` Vincent Mailhol [this message]
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=20220317035514.6378-5-mailhol.vincent@wanadoo.fr \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=benpicco@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sean@mess.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).