Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb KNF. No brackets around return value.
details: https://anonhg.NetBSD.org/src/rev/777ec27d3c34
branches: nick-nhusb
changeset: 334089:777ec27d3c34
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Dec 23 11:24:31 2014 +0000
description:
KNF. No brackets around return value.
diffstat:
sys/dev/usb/ezload.c | 18 ++--
sys/dev/usb/if_cdce.c | 42 +++++-----
sys/dev/usb/if_kue.c | 54 +++++++-------
sys/dev/usb/if_run.c | 160 ++++++++++++++++++++++----------------------
sys/dev/usb/if_smsc.c | 54 +++++++-------
sys/dev/usb/if_urndis.c | 36 +++++-----
sys/dev/usb/if_urtw.c | 6 +-
sys/dev/usb/if_urtwn.c | 6 +-
sys/dev/usb/moscom.c | 26 +++---
sys/dev/usb/u3g.c | 6 +-
sys/dev/usb/ucom.c | 6 +-
sys/dev/usb/umass_scsipi.c | 22 +++---
sys/dev/usb/umcs.c | 18 ++--
sys/dev/usb/umodem.c | 12 +-
sys/dev/usb/uthum.c | 12 +-
sys/dev/usb/uvideo.c | 10 +-
sys/dev/usb/uvscom.c | 54 +++++++-------
17 files changed, 271 insertions(+), 271 deletions(-)
diffs (truncated from 2067 to 300 lines):
diff -r d553f3d96215 -r 777ec27d3c34 sys/dev/usb/ezload.c
--- a/sys/dev/usb/ezload.c Tue Dec 23 11:10:41 2014 +0000
+++ b/sys/dev/usb/ezload.c Tue Dec 23 11:24:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ezload.c,v 1.15 2013/01/05 23:34:16 christos Exp $ */
+/* $NetBSD: ezload.c,v 1.15.14.1 2014/12/23 11:24:31 skrll Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ezload.c,v 1.15 2013/01/05 23:34:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ezload.c,v 1.15.14.1 2014/12/23 11:24:31 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,7 @@
USETW(req.wValue, ANCHOR_CPUCS_REG);
USETW(req.wIndex, 0);
USETW(req.wLength, 1);
- return (usbd_do_request(dev, &req, &rst));
+ return usbd_do_request(dev, &req, &rst);
}
usbd_status
@@ -115,7 +115,7 @@
#if 0
if (ptr->address + ptr->length > ANCHOR_MAX_INTERNAL_ADDRESS)
- return (USBD_INVAL);
+ return USBD_INVAL;
#endif
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
@@ -133,11 +133,11 @@
err = usbd_do_request(dev, &req,
__UNCONST(ptr->data + offs));
if (err)
- return (err);
+ return err;
}
}
- return (0);
+ return 0;
}
usbd_status
@@ -148,15 +148,15 @@
/*(void)ezload_reset(dev, 1);*/
err = ezload_reset(dev, 1);
if (err)
- return (err);
+ return err;
usbd_delay_ms(dev, 250);
while (*recs != NULL) {
err = ezload_download(dev, *recs++);
if (err)
- return (err);
+ return err;
}
usbd_delay_ms(dev, 250);
err = ezload_reset(dev, 0);
usbd_delay_ms(dev, 250);
- return (err);
+ return err;
}
diff -r d553f3d96215 -r 777ec27d3c34 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c Tue Dec 23 11:10:41 2014 +0000
+++ b/sys/dev/usb/if_cdce.c Tue Dec 23 11:24:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cdce.c,v 1.38.14.1 2014/12/02 09:00:33 skrll Exp $ */
+/* $NetBSD: if_cdce.c,v 1.38.14.2 2014/12/23 11:24:31 skrll Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.38.14.1 2014/12/02 09:00:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.38.14.2 2014/12/23 11:24:31 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -123,13 +123,13 @@
struct usbif_attach_arg *uaa = aux;
if (cdce_lookup(uaa->vendor, uaa->product) != NULL)
- return (UMATCH_VENDOR_PRODUCT);
+ return UMATCH_VENDOR_PRODUCT;
if (uaa->class == UICLASS_CDC && uaa->subclass ==
UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL)
- return (UMATCH_IFACECLASS_GENERIC);
+ return UMATCH_IFACECLASS_GENERIC;
- return (UMATCH_NONE);
+ return UMATCH_NONE;
}
void
@@ -315,7 +315,7 @@
if (!sc->cdce_attached) {
splx(s);
- return (0);
+ return 0;
}
if (ifp->if_flags & IFF_RUNNING)
@@ -328,7 +328,7 @@
sc->cdce_attached = 0;
splx(s);
- return (0);
+ return 0;
}
Static void
@@ -384,12 +384,12 @@
err = usbd_transfer(c->cdce_xfer);
if (err != USBD_IN_PROGRESS) {
cdce_stop(sc);
- return (EIO);
+ return EIO;
}
sc->cdce_cdata.cdce_tx_cnt++;
- return (0);
+ return 0;
}
Static void
@@ -461,7 +461,7 @@
int s, error = 0;
if (sc->cdce_dying)
- return (EIO);
+ return EIO;
s = splnet();
@@ -511,7 +511,7 @@
if (error == ENETRESET)
error = 0;
- return (error);
+ return error;
}
Static void
@@ -596,14 +596,14 @@
if (m_new == NULL) {
printf("%s: no memory for rx list "
"-- packet dropped!\n", device_xname(sc->cdce_dev));
- return (ENOBUFS);
+ return ENOBUFS;
}
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("%s: no memory for rx list "
"-- packet dropped!\n", device_xname(sc->cdce_dev));
m_freem(m_new);
- return (ENOBUFS);
+ return ENOBUFS;
}
m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
} else {
@@ -612,7 +612,7 @@
m_new->m_data = m_new->m_ext.ext_buf;
}
c->cdce_mbuf = m_new;
- return (0);
+ return 0;
}
Static int
@@ -628,19 +628,19 @@
c->cdce_sc = sc;
c->cdce_idx = i;
if (cdce_newbuf(sc, c, NULL) == ENOBUFS)
- return (ENOBUFS);
+ return ENOBUFS;
if (c->cdce_xfer == NULL) {
c->cdce_xfer = usbd_alloc_xfer(sc->cdce_udev);
if (c->cdce_xfer == NULL)
- return (ENOBUFS);
+ return ENOBUFS;
c->cdce_buf = usbd_alloc_buffer(c->cdce_xfer,
CDCE_BUFSZ);
if (c->cdce_buf == NULL)
- return (ENOBUFS);
+ return ENOBUFS;
}
}
- return (0);
+ return 0;
}
Static int
@@ -659,14 +659,14 @@
if (c->cdce_xfer == NULL) {
c->cdce_xfer = usbd_alloc_xfer(sc->cdce_udev);
if (c->cdce_xfer == NULL)
- return (ENOBUFS);
+ return ENOBUFS;
c->cdce_buf = usbd_alloc_buffer(c->cdce_xfer, CDCE_BUFSZ);
if (c->cdce_buf == NULL)
- return (ENOBUFS);
+ return ENOBUFS;
}
}
- return (0);
+ return 0;
}
Static void
diff -r d553f3d96215 -r 777ec27d3c34 sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Tue Dec 23 11:10:41 2014 +0000
+++ b/sys/dev/usb/if_kue.c Tue Dec 23 11:24:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.81.4.2 2014/12/03 14:18:07 skrll Exp $ */
+/* $NetBSD: if_kue.c,v 1.81.4.3 2014/12/23 11:24:31 skrll Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.81.4.2 2014/12/03 14:18:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.81.4.3 2014/12/23 11:24:31 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -197,7 +197,7 @@
USETW(req.wIndex, 0);
USETW(req.wLength, 0);
- return (usbd_do_request(sc->kue_udev, &req, NULL));
+ return usbd_do_request(sc->kue_udev, &req, NULL);
}
static usbd_status
@@ -219,7 +219,7 @@
USETW(req.wIndex, 0);
USETW(req.wLength, len);
- return (usbd_do_request(sc->kue_udev, &req, data));
+ return usbd_do_request(sc->kue_udev, &req, data);
}
static int
@@ -245,11 +245,11 @@
* running.
*/
if (usbd_get_device_desc(sc->kue_udev, &dd))
- return (EIO);
+ return EIO;
if (UGETW(dd.bcdDevice) == KUE_WARM_REV) {
printf("%s: warm boot, no firmware download\n",
device_xname(sc->kue_dev));
- return (0);
+ return 0;
}
printf("%s: cold boot, downloading firmware\n",
@@ -264,7 +264,7 @@
if (err) {
printf("%s: failed to load code segment: %s\n",
device_xname(sc->kue_dev), usbd_errstr(err));
- return (EIO);
+ return EIO;
}
/* Load fixup segment */
@@ -276,7 +276,7 @@
if (err) {
printf("%s: failed to load fixup segment: %s\n",
device_xname(sc->kue_dev), usbd_errstr(err));
- return (EIO);
+ return EIO;
}
/* Send trigger command. */
@@ -288,7 +288,7 @@
if (err) {
printf("%s: failed to load trigger segment: %s\n",
device_xname(sc->kue_dev), usbd_errstr(err));
- return (EIO);
+ return EIO;
}
usbd_delay_ms(sc->kue_udev, 10);
Home |
Main Index |
Thread Index |
Old Index