Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sound: usb: remove third argument of usb_maxpacket()

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: Jaroslav Kysela <perex@perex.cz>
CC: Takashi Iwai <tiwai@suse.com>
CC: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20220317035514.6378-8-mailhol.vincent@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vincent Mailhol and committed by
Greg Kroah-Hartman
80b2b03b dcd2e49b

+9 -9
+2 -2
sound/usb/line6/pcm.c
··· 552 552 553 553 line6pcm->max_packet_size_in = 554 554 usb_maxpacket(line6->usbdev, 555 - usb_rcvisocpipe(line6->usbdev, ep_read), 0); 555 + usb_rcvisocpipe(line6->usbdev, ep_read)); 556 556 line6pcm->max_packet_size_out = 557 557 usb_maxpacket(line6->usbdev, 558 - usb_sndisocpipe(line6->usbdev, ep_write), 1); 558 + usb_sndisocpipe(line6->usbdev, ep_write)); 559 559 if (!line6pcm->max_packet_size_in || !line6pcm->max_packet_size_out) { 560 560 dev_err(line6pcm->line6->ifcdev, 561 561 "cannot get proper max packet size\n");
+2 -2
sound/usb/midi.c
··· 1285 1285 pipe = usb_rcvintpipe(umidi->dev, ep_info->in_ep); 1286 1286 else 1287 1287 pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep); 1288 - length = usb_maxpacket(umidi->dev, pipe, 0); 1288 + length = usb_maxpacket(umidi->dev, pipe); 1289 1289 for (i = 0; i < INPUT_URBS; ++i) { 1290 1290 buffer = usb_alloc_coherent(umidi->dev, length, GFP_KERNEL, 1291 1291 &ep->urbs[i]->transfer_dma); ··· 1374 1374 pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep); 1375 1375 switch (umidi->usb_id) { 1376 1376 default: 1377 - ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1); 1377 + ep->max_transfer = usb_maxpacket(umidi->dev, pipe); 1378 1378 break; 1379 1379 /* 1380 1380 * Various chips declare a packet size larger than 4 bytes, but
+3 -3
sound/usb/usx2y/usb_stream.c
··· 51 51 { 52 52 int u, p; 53 53 int maxpacket = use_packsize ? 54 - use_packsize : usb_maxpacket(dev, pipe, usb_pipeout(pipe)); 54 + use_packsize : usb_maxpacket(dev, pipe); 55 55 int transfer_length = maxpacket * sk->n_o_ps; 56 56 57 57 for (u = 0; u < USB_STREAM_NURBS; ··· 171 171 out_pipe = usb_sndisocpipe(dev, out_endpoint); 172 172 173 173 max_packsize = use_packsize ? 174 - use_packsize : usb_maxpacket(dev, in_pipe, 0); 174 + use_packsize : usb_maxpacket(dev, in_pipe); 175 175 176 176 /* 177 177 t_period = period_frames / sample_rate ··· 187 187 read_size += packets * USB_STREAM_URBDEPTH * 188 188 (max_packsize + sizeof(struct usb_stream_packet)); 189 189 190 - max_packsize = usb_maxpacket(dev, out_pipe, 1); 190 + max_packsize = usb_maxpacket(dev, out_pipe); 191 191 write_size = max_packsize * packets * USB_STREAM_URBDEPTH; 192 192 193 193 if (read_size >= 256*PAGE_SIZE || write_size >= 256*PAGE_SIZE) {
+1 -1
sound/usb/usx2y/usbusx2yaudio.c
··· 421 421 422 422 pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : 423 423 usb_rcvisocpipe(dev, subs->endpoint); 424 - subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback); 424 + subs->maxpacksize = usb_maxpacket(dev, pipe); 425 425 if (!subs->maxpacksize) 426 426 return -EINVAL; 427 427
+1 -1
sound/usb/usx2y/usx2yhwdeppcm.c
··· 321 321 322 322 pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : 323 323 usb_rcvisocpipe(dev, subs->endpoint); 324 - subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback); 324 + subs->maxpacksize = usb_maxpacket(dev, pipe); 325 325 if (!subs->maxpacksize) 326 326 return -EINVAL; 327 327