Skip to content

Commit

Permalink
drivers/usb: Remove unnecessary return's from void functions
Browse files Browse the repository at this point in the history
Greg prefers this to go through the trivial tree.
http://lkml.org/lkml/2010/6/24/1

There are about 2500 void functions in drivers/usb
Only a few used return; at end of function.

Standardize them a bit.

Moved a statement down a line in drivers/usb/host/u132-hcd.c

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
JoePerches authored and Jiri Kosina committed Aug 10, 2010
1 parent 429d646 commit 7f26b3a
Show file tree
Hide file tree
Showing 30 changed files with 2 additions and 99 deletions.
1 change: 0 additions & 1 deletion drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,6 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
csr |= AT91_UDP_TXPKTRDY;
__raw_writel(csr, creg);
udc->req_pending = 0;
return;
}

static void handle_ep0(struct at91_udc *udc)
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/f_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ static void f_audio_playback_work(struct work_struct *data)

u_audio_playback(&audio->card, play_buf->buf, play_buf->actual);
f_audio_buffer_free(play_buf);

return;
}

static int f_audio_out_ep_complete(struct usb_ep *ep, struct usb_request *req)
Expand Down
4 changes: 0 additions & 4 deletions drivers/usb/gadget/f_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ static void hidg_set_report_complete(struct usb_ep *ep, struct usb_request *req)
spin_unlock(&hidg->spinlock);

wake_up(&hidg->read_queue);

return;
}

static int hidg_setup(struct usb_function *f,
Expand Down Expand Up @@ -413,8 +411,6 @@ static void hidg_disable(struct usb_function *f)

usb_ep_disable(hidg->in_ep);
hidg->in_ep->driver_data = NULL;

return;
}

static int hidg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
Expand Down
6 changes: 0 additions & 6 deletions drivers/usb/gadget/fsl_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ static void dr_controller_run(struct fsl_udc *udc)
temp = fsl_readl(&dr_regs->usbcmd);
temp |= USB_CMD_RUN_STOP;
fsl_writel(temp, &dr_regs->usbcmd);

return;
}

static void dr_controller_stop(struct fsl_udc *udc)
Expand All @@ -308,8 +306,6 @@ static void dr_controller_stop(struct fsl_udc *udc)
tmp = fsl_readl(&dr_regs->usbcmd);
tmp &= ~USB_CMD_RUN_STOP;
fsl_writel(tmp, &dr_regs->usbcmd);

return;
}

static void dr_ep_setup(unsigned char ep_num, unsigned char dir,
Expand Down Expand Up @@ -416,8 +412,6 @@ static void struct_ep_qh_setup(struct fsl_udc *udc, unsigned char ep_num,
p_QH->max_pkt_length = cpu_to_le32(tmp);
p_QH->next_dtd_ptr = 1;
p_QH->size_ioc_int_sts = 0;

return;
}

/* Setup qh structure and ep register for ep0. */
Expand Down
3 changes: 0 additions & 3 deletions drivers/usb/gadget/langwell_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ static void ep0_reset(struct langwell_udc *dev)
}

VDBG(dev, "<--- %s()\n", __func__);
return;
}


Expand Down Expand Up @@ -1486,7 +1485,6 @@ static void langwell_udc_start(struct langwell_udc *dev)
writel(usbcmd, &dev->op_regs->usbcmd);

DBG(dev, "<--- %s()\n", __func__);
return;
}


Expand All @@ -1509,7 +1507,6 @@ static void langwell_udc_stop(struct langwell_udc *dev)
writel(usbcmd, &dev->op_regs->usbcmd);

DBG(dev, "<--- %s()\n", __func__);
return;
}


Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/pxa27x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,6 @@ static void pxa_ep_fifo_flush(struct usb_ep *_ep)
}

spin_unlock_irqrestore(&ep->lock, flags);

return;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,6 @@ void rndis_deregister (int configNr)

if (configNr >= RNDIS_MAX_CONFIGS) return;
rndis_per_dev_params [configNr].used = 0;

return;
}

int rndis_set_param_dev(u8 configNr, struct net_device *dev, u16 *cdc_filter)
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ ehci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
ep->hcpriv = NULL;
done:
spin_unlock_irqrestore (&ehci->lock, flags);
return;
}

static void
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ ohci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
}
ep->hcpriv = NULL;
spin_unlock_irqrestore (&ohci->lock, flags);
return;
}

static int ohci_get_frame (struct usb_hcd *hcd)
Expand Down
9 changes: 0 additions & 9 deletions drivers/usb/host/oxu210hp-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,6 @@ static void oxu_buf_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd)
qtd->buffer = NULL;

spin_unlock(&oxu->mem_lock);

return;
}

static inline void ehci_qtd_init(struct ehci_qtd *qtd, dma_addr_t dma)
Expand All @@ -571,8 +569,6 @@ static inline void oxu_qtd_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd)
oxu->qtd_used[index] = 0;

spin_unlock(&oxu->mem_lock);

return;
}

static struct ehci_qtd *ehci_qtd_alloc(struct oxu_hcd *oxu)
Expand Down Expand Up @@ -615,8 +611,6 @@ static void oxu_qh_free(struct oxu_hcd *oxu, struct ehci_qh *qh)
oxu->qh_used[index] = 0;

spin_unlock(&oxu->mem_lock);

return;
}

static void qh_destroy(struct kref *kref)
Expand Down Expand Up @@ -693,8 +687,6 @@ static void oxu_murb_free(struct oxu_hcd *oxu, struct oxu_murb *murb)
oxu->murb_used[index] = 0;

spin_unlock(&oxu->mem_lock);

return;
}

static struct oxu_murb *oxu_murb_alloc(struct oxu_hcd *oxu)
Expand Down Expand Up @@ -3073,7 +3065,6 @@ static void oxu_endpoint_disable(struct usb_hcd *hcd,
ep->hcpriv = NULL;
done:
spin_unlock_irqrestore(&oxu->lock, flags);
return;
}

static int oxu_get_frame(struct usb_hcd *hcd)
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/host/pci-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
writel(0x3f, op_reg_base + EHCI_USBSTS);

iounmap(base);

return;
}

/*
Expand Down
8 changes: 2 additions & 6 deletions drivers/usb/host/u132-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,13 @@ static void u132_ring_requeue_work(struct u132 *u132, struct u132_ring *ring,
} else if (queue_delayed_work(workqueue, &ring->scheduler, 0))
return;
kref_put(&u132->kref, u132_hcd_delete);
return;
}

static void u132_ring_queue_work(struct u132 *u132, struct u132_ring *ring,
unsigned int delta)
{
kref_get(&u132->kref);
u132_ring_requeue_work(u132, ring, delta);
return;
}

static void u132_ring_cancel_work(struct u132 *u132, struct u132_ring *ring)
Expand Down Expand Up @@ -543,7 +541,6 @@ static void u132_hcd_giveback_urb(struct u132 *u132, struct u132_endp *endp,
mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
usb_hcd_giveback_urb(hcd, urb, status);
return;
}

static void u132_hcd_forget_urb(struct u132 *u132, struct u132_endp *endp,
Expand Down Expand Up @@ -574,8 +571,8 @@ static void u132_hcd_abandon_urb(struct u132 *u132, struct u132_endp *endp,
endp->active = 0;
spin_unlock_irqrestore(&endp->queue_lock.slock, irqs);
kfree(urbq);
} usb_hcd_giveback_urb(hcd, urb, status);
return;
}
usb_hcd_giveback_urb(hcd, urb, status);
}

static inline int edset_input(struct u132 *u132, struct u132_ring *ring,
Expand Down Expand Up @@ -3085,7 +3082,6 @@ static void u132_initialise(struct u132 *u132, struct platform_device *pdev)
u132->endp[endps] = NULL;

mutex_unlock(&u132->sw_lock);
return;
}

static int __devinit u132_probe(struct platform_device *pdev)
Expand Down
9 changes: 0 additions & 9 deletions drivers/usb/image/microtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ void mts_int_submit_urb (struct urb* transfer,
context->srb->result = DID_ERROR << 16;
mts_transfer_cleanup(transfer);
}
return;
}


Expand All @@ -409,7 +408,6 @@ static void mts_transfer_cleanup( struct urb *transfer )

if ( likely(context->final_callback != NULL) )
context->final_callback(context->srb);

}

static void mts_transfer_done( struct urb *transfer )
Expand All @@ -420,8 +418,6 @@ static void mts_transfer_done( struct urb *transfer )
context->srb->result |= (unsigned)(*context->scsi_status)<<1;

mts_transfer_cleanup(transfer);

return;
}


Expand Down Expand Up @@ -452,8 +448,6 @@ static void mts_data_done( struct urb* transfer )
}

mts_get_status(transfer);

return;
}


Expand Down Expand Up @@ -496,8 +490,6 @@ static void mts_command_done( struct urb *transfer )
mts_get_status(transfer);
}
}

return;
}

static void mts_do_sg (struct urb* transfer)
Expand All @@ -522,7 +514,6 @@ static void mts_do_sg (struct urb* transfer)
sg[context->fragment].length,
context->fragment + 1 == scsi_sg_count(context->srb) ?
mts_data_done : mts_do_sg);
return;
}

static const u8 mts_read_image_sig[] = { 0x28, 00, 00, 00 };
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/misc/ftdi-elan.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ static void ftdi_elan_cancel_targets(struct usb_ftdi *ftdi)
static void ftdi_elan_kick_command_queue(struct usb_ftdi *ftdi)
{
ftdi_command_queue_work(ftdi, 0);
return;
}

static void ftdi_elan_command_work(struct work_struct *work)
Expand All @@ -483,7 +482,6 @@ static void ftdi_elan_command_work(struct work_struct *work)
static void ftdi_elan_kick_respond_queue(struct usb_ftdi *ftdi)
{
ftdi_respond_queue_work(ftdi, 0);
return;
}

static void ftdi_elan_respond_work(struct work_struct *work)
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/mon/mon_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ static void mon_bus_submit(struct mon_bus *mbus, struct urb *urb)
r->rnf_submit(r->r_data, urb);
}
spin_unlock_irqrestore(&mbus->lock, flags);
return;
}

static void mon_submit(struct usb_bus *ubus, struct urb *urb)
Expand All @@ -117,7 +116,6 @@ static void mon_bus_submit_error(struct mon_bus *mbus, struct urb *urb, int erro
r->rnf_error(r->r_data, urb, error);
}
spin_unlock_irqrestore(&mbus->lock, flags);
return;
}

static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int error)
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ void musb_g_rx(struct musb *musb, u8 epnum)
DBG(3, "packet waiting for %s%s request\n",
musb_ep->desc ? "" : "inactive ",
musb_ep->end_point.name);
return;
}

/* ------------------------------------------------------------ */
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/serial/cypress_m8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,6 @@ static void cypress_read_int_callback(struct urb *urb)
cypress_set_dead(port);
}
}

return;
} /* cypress_read_int_callback */


Expand Down
1 change: 0 additions & 1 deletion drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,6 @@ static void ftdi_set_termios(struct tty_struct *tty,
/* lower DTR/RTS */
clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
}
return;
}

static int ftdi_tiocmget(struct tty_struct *tty, struct file *file)
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/serial/garmin_gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ static void garmin_read_bulk_callback(struct urb *urb)
garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE;
spin_unlock_irqrestore(&garmin_data_p->lock, flags);
}
return;
}


Expand Down
11 changes: 0 additions & 11 deletions drivers/usb/serial/io_edgeport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,8 +1465,6 @@ static void edge_throttle(struct tty_struct *tty)
if (status != 0)
return;
}

return;
}


Expand Down Expand Up @@ -1770,8 +1768,6 @@ static void edge_break(struct tty_struct *tty, int break_state)
dbg("%s - error sending break set/clear command.",
__func__);
}

return;
}


Expand Down Expand Up @@ -2042,7 +2038,6 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
dbg("%s - Unrecognized IOSP status code %u", __func__, code);
break;
}
return;
}


Expand Down Expand Up @@ -2095,8 +2090,6 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr)

/* Save the new modem status */
edge_port->shadowMSR = newMsr & 0xf0;

return;
}


Expand Down Expand Up @@ -2143,8 +2136,6 @@ static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData,
icount->parity++;
if (newLsr & LSR_FRM_ERR)
icount->frame++;

return;
}


Expand Down Expand Up @@ -2720,7 +2711,6 @@ static void change_port_settings(struct tty_struct *tty,
baud = tty_termios_baud_rate(old_termios);
tty_encode_baud_rate(tty, baud, baud);
}
return;
}


Expand Down Expand Up @@ -2922,7 +2912,6 @@ static void load_application_firmware(struct edgeport_serial *edge_serial)
0x40, 0x4000, 0x0001, NULL, 0, 3000);

release_firmware(fw);
return;
}


Expand Down
Loading

0 comments on commit 7f26b3a

Please sign in to comment.