diff options
author | Joe Perches <joe@perches.com> | 2010-08-04 13:40:08 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-10 08:25:42 -0400 |
commit | 7f26b3a7533bbc1ddd88b297c935ee4da8f74cea (patch) | |
tree | 28ba09da29cf391405a932ef243ea49d96a21204 /drivers/usb/serial | |
parent | 429d646d9aeafdb57717dab75c807215f5cce9c2 (diff) |
drivers/usb: Remove unnecessary return's from void functions
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 <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/garmin_gps.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 11 | ||||
-rw-r--r-- | drivers/usb/serial/io_ti.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/iuu_phoenix.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/keyspan_pda.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/mos7720.c | 6 | ||||
-rw-r--r-- | drivers/usb/serial/mos7840.c | 7 | ||||
-rw-r--r-- | drivers/usb/serial/omninet.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/sierra.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/spcp8x5.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/usb_wwan.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 6 |
14 files changed, 0 insertions, 46 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index f5d06746cc3b..2edf238b00b9 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -1320,8 +1320,6 @@ continue_read: | |||
1320 | cypress_set_dead(port); | 1320 | cypress_set_dead(port); |
1321 | } | 1321 | } |
1322 | } | 1322 | } |
1323 | |||
1324 | return; | ||
1325 | } /* cypress_read_int_callback */ | 1323 | } /* cypress_read_int_callback */ |
1326 | 1324 | ||
1327 | 1325 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index e298dc4baed7..e34023ff5771 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -2065,7 +2065,6 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2065 | /* lower DTR/RTS */ | 2065 | /* lower DTR/RTS */ |
2066 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 2066 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
2067 | } | 2067 | } |
2068 | return; | ||
2069 | } | 2068 | } |
2070 | 2069 | ||
2071 | static int ftdi_tiocmget(struct tty_struct *tty, struct file *file) | 2070 | static int ftdi_tiocmget(struct tty_struct *tty, struct file *file) |
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index a42b29a695b2..26710b189918 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -1264,7 +1264,6 @@ static void garmin_read_bulk_callback(struct urb *urb) | |||
1264 | garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE; | 1264 | garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE; |
1265 | spin_unlock_irqrestore(&garmin_data_p->lock, flags); | 1265 | spin_unlock_irqrestore(&garmin_data_p->lock, flags); |
1266 | } | 1266 | } |
1267 | return; | ||
1268 | } | 1267 | } |
1269 | 1268 | ||
1270 | 1269 | ||
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 76e6fb3aab7a..892e916ef67e 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -1465,8 +1465,6 @@ static void edge_throttle(struct tty_struct *tty) | |||
1465 | if (status != 0) | 1465 | if (status != 0) |
1466 | return; | 1466 | return; |
1467 | } | 1467 | } |
1468 | |||
1469 | return; | ||
1470 | } | 1468 | } |
1471 | 1469 | ||
1472 | 1470 | ||
@@ -1770,8 +1768,6 @@ static void edge_break(struct tty_struct *tty, int break_state) | |||
1770 | dbg("%s - error sending break set/clear command.", | 1768 | dbg("%s - error sending break set/clear command.", |
1771 | __func__); | 1769 | __func__); |
1772 | } | 1770 | } |
1773 | |||
1774 | return; | ||
1775 | } | 1771 | } |
1776 | 1772 | ||
1777 | 1773 | ||
@@ -2042,7 +2038,6 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial, | |||
2042 | dbg("%s - Unrecognized IOSP status code %u", __func__, code); | 2038 | dbg("%s - Unrecognized IOSP status code %u", __func__, code); |
2043 | break; | 2039 | break; |
2044 | } | 2040 | } |
2045 | return; | ||
2046 | } | 2041 | } |
2047 | 2042 | ||
2048 | 2043 | ||
@@ -2095,8 +2090,6 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr) | |||
2095 | 2090 | ||
2096 | /* Save the new modem status */ | 2091 | /* Save the new modem status */ |
2097 | edge_port->shadowMSR = newMsr & 0xf0; | 2092 | edge_port->shadowMSR = newMsr & 0xf0; |
2098 | |||
2099 | return; | ||
2100 | } | 2093 | } |
2101 | 2094 | ||
2102 | 2095 | ||
@@ -2143,8 +2136,6 @@ static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData, | |||
2143 | icount->parity++; | 2136 | icount->parity++; |
2144 | if (newLsr & LSR_FRM_ERR) | 2137 | if (newLsr & LSR_FRM_ERR) |
2145 | icount->frame++; | 2138 | icount->frame++; |
2146 | |||
2147 | return; | ||
2148 | } | 2139 | } |
2149 | 2140 | ||
2150 | 2141 | ||
@@ -2720,7 +2711,6 @@ static void change_port_settings(struct tty_struct *tty, | |||
2720 | baud = tty_termios_baud_rate(old_termios); | 2711 | baud = tty_termios_baud_rate(old_termios); |
2721 | tty_encode_baud_rate(tty, baud, baud); | 2712 | tty_encode_baud_rate(tty, baud, baud); |
2722 | } | 2713 | } |
2723 | return; | ||
2724 | } | 2714 | } |
2725 | 2715 | ||
2726 | 2716 | ||
@@ -2922,7 +2912,6 @@ static void load_application_firmware(struct edgeport_serial *edge_serial) | |||
2922 | 0x40, 0x4000, 0x0001, NULL, 0, 3000); | 2912 | 0x40, 0x4000, 0x0001, NULL, 0, 3000); |
2923 | 2913 | ||
2924 | release_firmware(fw); | 2914 | release_firmware(fw); |
2925 | return; | ||
2926 | } | 2915 | } |
2927 | 2916 | ||
2928 | 2917 | ||
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 0fca2659206f..4a6da66d5fd2 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -1571,8 +1571,6 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 msr) | |||
1571 | } | 1571 | } |
1572 | } | 1572 | } |
1573 | tty_kref_put(tty); | 1573 | tty_kref_put(tty); |
1574 | |||
1575 | return; | ||
1576 | } | 1574 | } |
1577 | 1575 | ||
1578 | static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data, | 1576 | static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data, |
@@ -2424,7 +2422,6 @@ static void change_port_settings(struct tty_struct *tty, | |||
2424 | dbg("%s - error %d when trying to write config to device", | 2422 | dbg("%s - error %d when trying to write config to device", |
2425 | __func__, status); | 2423 | __func__, status); |
2426 | kfree(config); | 2424 | kfree(config); |
2427 | return; | ||
2428 | } | 2425 | } |
2429 | 2426 | ||
2430 | static void edge_set_termios(struct tty_struct *tty, | 2427 | static void edge_set_termios(struct tty_struct *tty, |
@@ -2445,7 +2442,6 @@ static void edge_set_termios(struct tty_struct *tty, | |||
2445 | return; | 2442 | return; |
2446 | /* change the port settings to the new ones specified */ | 2443 | /* change the port settings to the new ones specified */ |
2447 | change_port_settings(tty, edge_port, old_termios); | 2444 | change_port_settings(tty, edge_port, old_termios); |
2448 | return; | ||
2449 | } | 2445 | } |
2450 | 2446 | ||
2451 | static int edge_tiocmset(struct tty_struct *tty, struct file *file, | 2447 | static int edge_tiocmset(struct tty_struct *tty, struct file *file, |
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 74551cb2e8ee..55766a65f0ad 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c | |||
@@ -801,7 +801,6 @@ static void read_rxcmd_callback(struct urb *urb) | |||
801 | iuu_uart_read_callback, port); | 801 | iuu_uart_read_callback, port); |
802 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 802 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
803 | dbg("%s - submit result = %d", __func__, result); | 803 | dbg("%s - submit result = %d", __func__, result); |
804 | return; | ||
805 | } | 804 | } |
806 | 805 | ||
807 | static int iuu_uart_on(struct usb_serial_port *port) | 806 | static int iuu_uart_on(struct usb_serial_port *port) |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 185fe9a7d4e0..a10dd5676ccc 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -292,7 +292,6 @@ static void keyspan_pda_rx_unthrottle(struct tty_struct *tty) | |||
292 | port->interrupt_in_urb->dev = port->serial->dev; | 292 | port->interrupt_in_urb->dev = port->serial->dev; |
293 | if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL)) | 293 | if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL)) |
294 | dbg(" usb_submit_urb(read urb) failed"); | 294 | dbg(" usb_submit_urb(read urb) failed"); |
295 | return; | ||
296 | } | 295 | } |
297 | 296 | ||
298 | 297 | ||
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 30922a7e3347..f442333dfa99 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -827,7 +827,6 @@ exit: | |||
827 | dev_err(&urb->dev->dev, | 827 | dev_err(&urb->dev->dev, |
828 | "%s - Error %d submitting control urb\n", | 828 | "%s - Error %d submitting control urb\n", |
829 | __func__, result); | 829 | __func__, result); |
830 | return; | ||
831 | } | 830 | } |
832 | 831 | ||
833 | /* | 832 | /* |
@@ -907,7 +906,6 @@ exit: | |||
907 | dev_err(&urb->dev->dev, | 906 | dev_err(&urb->dev->dev, |
908 | "%s - Error %d submitting control urb\n", | 907 | "%s - Error %d submitting control urb\n", |
909 | __func__, result); | 908 | __func__, result); |
910 | return; | ||
911 | } | 909 | } |
912 | 910 | ||
913 | /* | 911 | /* |
@@ -1227,8 +1225,6 @@ static void mos7720_break(struct tty_struct *tty, int break_state) | |||
1227 | mos7720_port->shadowLCR = data; | 1225 | mos7720_port->shadowLCR = data; |
1228 | write_mos_reg(serial, port->number - port->serial->minor, | 1226 | write_mos_reg(serial, port->number - port->serial->minor, |
1229 | LCR, mos7720_port->shadowLCR); | 1227 | LCR, mos7720_port->shadowLCR); |
1230 | |||
1231 | return; | ||
1232 | } | 1228 | } |
1233 | 1229 | ||
1234 | /* | 1230 | /* |
@@ -1746,7 +1742,6 @@ static void change_port_settings(struct tty_struct *tty, | |||
1746 | dbg("usb_submit_urb(read bulk) failed, status = %d", | 1742 | dbg("usb_submit_urb(read bulk) failed, status = %d", |
1747 | status); | 1743 | status); |
1748 | } | 1744 | } |
1749 | return; | ||
1750 | } | 1745 | } |
1751 | 1746 | ||
1752 | /* | 1747 | /* |
@@ -1803,7 +1798,6 @@ static void mos7720_set_termios(struct tty_struct *tty, | |||
1803 | dbg("usb_submit_urb(read bulk) failed, status = %d", | 1798 | dbg("usb_submit_urb(read bulk) failed, status = %d", |
1804 | status); | 1799 | status); |
1805 | } | 1800 | } |
1806 | return; | ||
1807 | } | 1801 | } |
1808 | 1802 | ||
1809 | /* | 1803 | /* |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 585b7e663740..d3fc30c5959d 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -1355,8 +1355,6 @@ static void mos7840_break(struct tty_struct *tty, int break_state) | |||
1355 | mos7840_port->shadowLCR); | 1355 | mos7840_port->shadowLCR); |
1356 | mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, | 1356 | mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, |
1357 | mos7840_port->shadowLCR); | 1357 | mos7840_port->shadowLCR); |
1358 | |||
1359 | return; | ||
1360 | } | 1358 | } |
1361 | 1359 | ||
1362 | /***************************************************************************** | 1360 | /***************************************************************************** |
@@ -1587,8 +1585,6 @@ static void mos7840_throttle(struct tty_struct *tty) | |||
1587 | if (status < 0) | 1585 | if (status < 0) |
1588 | return; | 1586 | return; |
1589 | } | 1587 | } |
1590 | |||
1591 | return; | ||
1592 | } | 1588 | } |
1593 | 1589 | ||
1594 | /***************************************************************************** | 1590 | /***************************************************************************** |
@@ -2063,8 +2059,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty, | |||
2063 | mos7840_port->delta_msr_cond = 1; | 2059 | mos7840_port->delta_msr_cond = 1; |
2064 | dbg("mos7840_change_port_settings mos7840_port->shadowLCR is End %x", | 2060 | dbg("mos7840_change_port_settings mos7840_port->shadowLCR is End %x", |
2065 | mos7840_port->shadowLCR); | 2061 | mos7840_port->shadowLCR); |
2066 | |||
2067 | return; | ||
2068 | } | 2062 | } |
2069 | 2063 | ||
2070 | /***************************************************************************** | 2064 | /***************************************************************************** |
@@ -2133,7 +2127,6 @@ static void mos7840_set_termios(struct tty_struct *tty, | |||
2133 | mos7840_port->read_urb_busy = false; | 2127 | mos7840_port->read_urb_busy = false; |
2134 | } | 2128 | } |
2135 | } | 2129 | } |
2136 | return; | ||
2137 | } | 2130 | } |
2138 | 2131 | ||
2139 | /***************************************************************************** | 2132 | /***************************************************************************** |
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 89c724c0ac0a..60f38d5e64fc 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c | |||
@@ -246,8 +246,6 @@ static void omninet_read_bulk_callback(struct urb *urb) | |||
246 | dev_err(&port->dev, | 246 | dev_err(&port->dev, |
247 | "%s - failed resubmitting read urb, error %d\n", | 247 | "%s - failed resubmitting read urb, error %d\n", |
248 | __func__, result); | 248 | __func__, result); |
249 | |||
250 | return; | ||
251 | } | 249 | } |
252 | 250 | ||
253 | static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, | 251 | static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index d47b56e9e8ce..7481ff8a49e4 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -620,8 +620,6 @@ static void sierra_indat_callback(struct urb *urb) | |||
620 | dev_err(&port->dev, "resubmit read urb failed." | 620 | dev_err(&port->dev, "resubmit read urb failed." |
621 | "(%d)\n", err); | 621 | "(%d)\n", err); |
622 | } | 622 | } |
623 | |||
624 | return; | ||
625 | } | 623 | } |
626 | 624 | ||
627 | static void sierra_instat_callback(struct urb *urb) | 625 | static void sierra_instat_callback(struct urb *urb) |
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 329d311a35d9..765aa983bf58 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c | |||
@@ -441,7 +441,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
441 | spcp8x5_set_workMode(serial->dev, 0x000a, | 441 | spcp8x5_set_workMode(serial->dev, 0x000a, |
442 | SET_WORKING_MODE_U2C, priv->type); | 442 | SET_WORKING_MODE_U2C, priv->type); |
443 | } | 443 | } |
444 | return; | ||
445 | } | 444 | } |
446 | 445 | ||
447 | /* open the serial port. do some usb system call. set termios and get the line | 446 | /* open the serial port. do some usb system call. set termios and get the line |
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 0c70b4a621bb..fbc946797801 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
@@ -234,7 +234,6 @@ static void usb_wwan_indat_callback(struct urb *urb) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | } | 236 | } |
237 | return; | ||
238 | } | 237 | } |
239 | 238 | ||
240 | static void usb_wwan_outdat_callback(struct urb *urb) | 239 | static void usb_wwan_outdat_callback(struct urb *urb) |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 12ed8209ca72..3f9ac88d588c 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -655,8 +655,6 @@ static void whiteheat_release(struct usb_serial *serial) | |||
655 | } | 655 | } |
656 | kfree(info); | 656 | kfree(info); |
657 | } | 657 | } |
658 | |||
659 | return; | ||
660 | } | 658 | } |
661 | 659 | ||
662 | static int whiteheat_open(struct tty_struct *tty, struct usb_serial_port *port) | 660 | static int whiteheat_open(struct tty_struct *tty, struct usb_serial_port *port) |
@@ -955,8 +953,6 @@ static void whiteheat_throttle(struct tty_struct *tty) | |||
955 | spin_lock_irq(&info->lock); | 953 | spin_lock_irq(&info->lock); |
956 | info->flags |= THROTTLED; | 954 | info->flags |= THROTTLED; |
957 | spin_unlock_irq(&info->lock); | 955 | spin_unlock_irq(&info->lock); |
958 | |||
959 | return; | ||
960 | } | 956 | } |
961 | 957 | ||
962 | 958 | ||
@@ -975,8 +971,6 @@ static void whiteheat_unthrottle(struct tty_struct *tty) | |||
975 | 971 | ||
976 | if (actually_throttled) | 972 | if (actually_throttled) |
977 | rx_data_softint(&info->rx_work); | 973 | rx_data_softint(&info->rx_work); |
978 | |||
979 | return; | ||
980 | } | 974 | } |
981 | 975 | ||
982 | 976 | ||