Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38492ccb authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: octeon-usb: eliminate redundant parameter from find_ready_pipe



current_frame always equals usb->frame_number.

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68ea3380
Loading
Loading
Loading
Loading
+6 −12
Original line number Original line Diff line number Diff line
@@ -1840,16 +1840,14 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel,
 * Find a pipe that is ready to be scheduled to hardware.
 * Find a pipe that is ready to be scheduled to hardware.
 * @usb:	 USB device state populated by cvmx_usb_initialize().
 * @usb:	 USB device state populated by cvmx_usb_initialize().
 * @list:	 Pipe list to search
 * @list:	 Pipe list to search
 * @current_frame:
 *		 Frame counter to use as a time reference.
 *
 *
 * Returns: Pipe or NULL if none are ready
 * Returns: Pipe or NULL if none are ready
 */
 */
static struct cvmx_usb_pipe *cvmx_usb_find_ready_pipe(
static struct cvmx_usb_pipe *cvmx_usb_find_ready_pipe(
		struct cvmx_usb_state *usb,
		struct cvmx_usb_state *usb,
		struct list_head *list,
		struct list_head *list)
		u64 current_frame)
{
{
	u64 current_frame = usb->frame_number;
	struct cvmx_usb_pipe *pipe;
	struct cvmx_usb_pipe *pipe;


	list_for_each_entry(pipe, list, node) {
	list_for_each_entry(pipe, list, node) {
@@ -1917,21 +1915,17 @@ static void cvmx_usb_schedule(struct cvmx_usb_state *usb, int is_sof)
			 * beginning of the frame
			 * beginning of the frame
			 */
			 */
			pipe = cvmx_usb_find_ready_pipe(usb,
			pipe = cvmx_usb_find_ready_pipe(usb,
							usb->active_pipes + CVMX_USB_TRANSFER_ISOCHRONOUS,
							usb->active_pipes + CVMX_USB_TRANSFER_ISOCHRONOUS);
							usb->frame_number);
			if (likely(!pipe))
			if (likely(!pipe))
				pipe = cvmx_usb_find_ready_pipe(usb,
				pipe = cvmx_usb_find_ready_pipe(usb,
								usb->active_pipes + CVMX_USB_TRANSFER_INTERRUPT,
								usb->active_pipes + CVMX_USB_TRANSFER_INTERRUPT);
								usb->frame_number);
		}
		}
		if (likely(!pipe)) {
		if (likely(!pipe)) {
			pipe = cvmx_usb_find_ready_pipe(usb,
			pipe = cvmx_usb_find_ready_pipe(usb,
							usb->active_pipes + CVMX_USB_TRANSFER_CONTROL,
							usb->active_pipes + CVMX_USB_TRANSFER_CONTROL);
							usb->frame_number);
			if (likely(!pipe))
			if (likely(!pipe))
				pipe = cvmx_usb_find_ready_pipe(usb,
				pipe = cvmx_usb_find_ready_pipe(usb,
								usb->active_pipes + CVMX_USB_TRANSFER_BULK,
								usb->active_pipes + CVMX_USB_TRANSFER_BULK);
								usb->frame_number);
		}
		}
		if (!pipe)
		if (!pipe)
			break;
			break;