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 sizeof KNF
details: https://anonhg.NetBSD.org/src/rev/c333358214e2
branches: nick-nhusb
changeset: 334255:c333358214e2
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Sep 29 11:38:28 2015 +0000
description:
sizeof KNF
diffstat:
sys/dev/usb/aubtfwl.c | 20 +++++++++---------
sys/dev/usb/if_rum.c | 24 +++++++++++-----------
sys/dev/usb/if_rumreg.h | 6 ++--
sys/dev/usb/if_run.c | 40 +++++++++++++++++++-------------------
sys/dev/usb/if_runvar.h | 14 ++++++------
sys/dev/usb/if_ural.c | 30 ++++++++++++++--------------
sys/dev/usb/if_uralreg.h | 6 ++--
sys/dev/usb/if_urtw.c | 8 +++---
sys/dev/usb/if_zyd.c | 48 +++++++++++++++++++++++-----------------------
sys/dev/usb/if_zydreg.h | 10 ++++----
sys/dev/usb/uatp.c | 10 ++++----
sys/dev/usb/uaudio.c | 8 +++---
sys/dev/usb/uchcom.c | 8 +++---
sys/dev/usb/uhci.c | 16 +++++++-------
sys/dev/usb/uhcivar.h | 6 ++--
sys/dev/usb/uhid.c | 6 ++--
sys/dev/usb/uhidev.c | 16 +++++++-------
sys/dev/usb/uhub.c | 8 +++---
sys/dev/usb/ukyopon.c | 6 ++--
sys/dev/usb/umass_isdata.c | 16 +++++++-------
sys/dev/usb/umass_scsipi.c | 6 ++--
sys/dev/usb/umcs.c | 6 ++--
sys/dev/usb/umidi.c | 22 ++++++++++----------
sys/dev/usb/usb.c | 10 ++++----
sys/dev/usb/usb_mem.c | 12 +++++-----
sys/dev/usb/usb_subr.c | 6 ++--
sys/dev/usb/usbdi.h | 4 +-
sys/dev/usb/usbdi_util.c | 8 +++---
sys/dev/usb/usscanner.c | 14 ++++++------
sys/dev/usb/uvisor.c | 6 ++--
sys/dev/usb/xhci.c | 6 ++--
31 files changed, 203 insertions(+), 203 deletions(-)
diffs (truncated from 1630 to 300 lines):
diff -r 77475314fa30 -r c333358214e2 sys/dev/usb/aubtfwl.c
--- a/sys/dev/usb/aubtfwl.c Tue Sep 29 09:48:20 2015 +0000
+++ b/sys/dev/usb/aubtfwl.c Tue Sep 29 11:38:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aubtfwl.c,v 1.5.10.6 2015/06/23 12:07:20 skrll Exp $ */
+/* $NetBSD: aubtfwl.c,v 1.5.10.7 2015/09/29 11:38:28 skrll Exp $ */
/*
* Copyright (c) 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.5.10.6 2015/06/23 12:07:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.5.10.7 2015/09/29 11:38:28 skrll Exp $");
#include <sys/param.h>
#include <dev/usb/usb.h>
@@ -119,7 +119,7 @@
size_t fwo = 0;
uint32_t n;
- memset(&req, 0, sizeof req);
+ memset(&req, 0, sizeof(req));
error = firmware_open("ubt", name, &fwh);
if (error != 0) {
@@ -218,13 +218,13 @@
usb_device_request_t req;
int error = 0;
- memset(&req, 0, sizeof req);
+ memset(&req, 0, sizeof(req));
req.bRequest = AR3K_GET_STATE;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
USETW(req.wValue, 0);
USETW(req.wIndex, 0);
- USETW(req.wLength, sizeof *state);
+ USETW(req.wLength, sizeof(*state));
error = usbd_do_request(sc->sc_udev, &req, state);
@@ -236,13 +236,13 @@
usb_device_request_t req;
int error = 0;
- memset(&req, 0, sizeof req);
+ memset(&req, 0, sizeof(req));
req.bRequest = AR3K_GET_VERSION;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
USETW(req.wValue, 0);
USETW(req.wIndex, 0);
- USETW(req.wLength, sizeof *ver);
+ USETW(req.wLength, sizeof(*ver));
error = usbd_do_request(sc->sc_udev, &req, ver);
@@ -261,7 +261,7 @@
usb_device_request_t req;
int error = 0;
- memset(&req, 0, sizeof req);
+ memset(&req, 0, sizeof(req));
req.bRequest = cmd;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
@@ -298,7 +298,7 @@
aprint_verbose_dev(self, "state is 0x%02x\n", state);
if (!(state & AR3K_STATE_IS_PATCHED)) {
- snprintf(firmware_name, sizeof firmware_name,
+ snprintf(firmware_name, sizeof(firmware_name),
"ar3k/AthrBT_0x%08x.dfu", ver.rom);
error = aubtfwl_firmware_load(self, firmware_name);
@@ -318,7 +318,7 @@
break;
}
- snprintf(firmware_name, sizeof firmware_name,
+ snprintf(firmware_name, sizeof(firmware_name),
"ar3k/ramps_0x%08x_%d.dfu", ver.rom, clock);
aubtfwl_firmware_load(self, firmware_name);
diff -r 77475314fa30 -r c333358214e2 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c Tue Sep 29 09:48:20 2015 +0000
+++ b/sys/dev/usb/if_rum.c Tue Sep 29 11:38:28 2015 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
-/* $NetBSD: if_rum.c,v 1.48.6.8 2015/09/22 12:06:01 skrll Exp $ */
+/* $NetBSD: if_rum.c,v 1.48.6.9 2015/09/29 11:38:28 skrll Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.48.6.8 2015/09/22 12:06:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.48.6.9 2015/09/29 11:38:28 skrll Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -466,14 +466,14 @@
ieee80211_media_init(ic, rum_media_change, ieee80211_media_status);
bpf_attach2(ifp, DLT_IEEE802_11_RADIO,
- sizeof (struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN,
+ sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN,
&sc->sc_drvbpf);
- sc->sc_rxtap_len = sizeof sc->sc_rxtapu;
+ sc->sc_rxtap_len = sizeof(sc->sc_rxtapu);
sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len);
sc->sc_rxtap.wr_ihdr.it_present = htole32(RT2573_RX_RADIOTAP_PRESENT);
- sc->sc_txtap_len = sizeof sc->sc_txtapu;
+ sc->sc_txtap_len = sizeof(sc->sc_txtapu);
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RT2573_TX_RADIOTAP_PRESENT);
@@ -1443,7 +1443,7 @@
{
uint32_t val;
- rum_read_multi(sc, reg, &val, sizeof val);
+ rum_read_multi(sc, reg, &val, sizeof(val));
return le32toh(val);
}
@@ -1472,7 +1472,7 @@
{
uint32_t tmp = htole32(val);
- rum_write_multi(sc, reg, &tmp, sizeof tmp);
+ rum_write_multi(sc, reg, &tmp, sizeof(tmp));
}
static void
@@ -1923,7 +1923,7 @@
/* read Tx power for all a/b/g channels */
rum_eeprom_read(sc, RT2573_EEPROM_TXPOWER, sc->txpow, 14);
/* XXX default Tx power for 802.11a channels */
- memset(sc->txpow + 14, 24, sizeof (sc->txpow) - 14);
+ memset(sc->txpow + 14, 24, sizeof(sc->txpow) - 14);
#ifdef RUM_DEBUG
for (i = 0; i < 14; i++)
DPRINTF(("Channel=%d Tx power=%d\n", i + 1, sc->txpow[i]));
@@ -2024,7 +2024,7 @@
rum_set_chan(sc, ic->ic_curchan);
/* clear STA registers */
- rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof sc->sta);
+ rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof(sc->sta));
IEEE80211_ADDR_COPY(ic->ic_myaddr, CLLADDR(ifp->if_sadl));
rum_set_macaddr(sc, ic->ic_myaddr);
@@ -2237,7 +2237,7 @@
int i;
/* clear statistic registers (STA_CSR0 to STA_CSR5) */
- rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof sc->sta);
+ rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof(sc->sta));
ieee80211_amrr_node_init(&sc->amrr, &sc->amn);
@@ -2263,10 +2263,10 @@
req.bRequest = RT2573_READ_MULTI_MAC;
USETW(req.wValue, 0);
USETW(req.wIndex, RT2573_STA_CSR0);
- USETW(req.wLength, sizeof sc->sta);
+ USETW(req.wLength, sizeof(sc->sta));
usbd_setup_default_xfer(sc->amrr_xfer, sc->sc_udev, sc,
- USBD_DEFAULT_TIMEOUT, &req, sc->sta, sizeof sc->sta, 0,
+ USBD_DEFAULT_TIMEOUT, &req, sc->sta, sizeof(sc->sta), 0,
rum_amrr_update);
(void)usbd_transfer(sc->amrr_xfer);
}
diff -r 77475314fa30 -r c333358214e2 sys/dev/usb/if_rumreg.h
--- a/sys/dev/usb/if_rumreg.h Tue Sep 29 09:48:20 2015 +0000
+++ b/sys/dev/usb/if_rumreg.h Tue Sep 29 11:38:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rumreg.h,v 1.4 2011/02/21 23:50:42 jmcneill Exp $ */
+/* $NetBSD: if_rumreg.h,v 1.4.34.1 2015/09/29 11:38:28 skrll Exp $ */
/* $OpenBSD: if_rumreg.h,v 1.14 2009/08/10 18:04:56 damien Exp $ */
/*-
@@ -18,8 +18,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RT2573_TX_DESC_SIZE (sizeof (struct rum_tx_desc))
-#define RT2573_RX_DESC_SIZE (sizeof (struct rum_rx_desc))
+#define RT2573_TX_DESC_SIZE (sizeof(struct rum_tx_desc))
+#define RT2573_RX_DESC_SIZE (sizeof(struct rum_rx_desc))
#define RT2573_CONFIG_NO 1
#define RT2573_IFACE_INDEX 0
diff -r 77475314fa30 -r c333358214e2 sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c Tue Sep 29 09:48:20 2015 +0000
+++ b/sys/dev/usb/if_run.c Tue Sep 29 11:38:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_run.c,v 1.10.6.5 2015/04/06 15:18:13 skrll Exp $ */
+/* $NetBSD: if_run.c,v 1.10.6.6 2015/09/29 11:38:28 skrll Exp $ */
/* $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.6.5 2015/04/06 15:18:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.6.6 2015/09/29 11:38:28 skrll Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -796,8 +796,8 @@
goto fail;
}
/* zeroize the TXD + TXWI part */
- memset(data->buf, 0, sizeof (struct rt2870_txd) +
- sizeof (struct rt2860_txwi));
+ memset(data->buf, 0, sizeof(struct rt2870_txd) +
+ sizeof(struct rt2860_txwi));
}
if (error != 0)
fail: run_free_tx_ring(sc, qid);
@@ -911,7 +911,7 @@
uint32_t tmp;
int error;
- error = run_read_region_1(sc, reg, (uint8_t *)&tmp, sizeof tmp);
+ error = run_read_region_1(sc, reg, (uint8_t *)&tmp, sizeof(tmp));
if (error == 0)
*val = le32toh(tmp);
else
@@ -1048,7 +1048,7 @@
req.bRequest = RT2870_EEPROM_READ;
USETW(req.wValue, 0);
USETW(req.wIndex, addr);
- USETW(req.wLength, sizeof tmp);
+ USETW(req.wLength, sizeof(tmp));
error = usbd_do_request(sc->sc_udev, &req, &tmp);
if (error == 0)
*val = le16toh(tmp);
@@ -1507,7 +1507,7 @@
run_node_alloc(struct ieee80211_node_table *nt)
{
struct run_node *rn =
- malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO);
+ malloc(sizeof(struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO);
return rn ? &rn->ni : NULL;
}
@@ -1584,7 +1584,7 @@
s = splusb();
cmd = &ring->cmd[ring->cur];
cmd->cb = cb;
- KASSERT(len <= sizeof (cmd->data));
+ KASSERT(len <= sizeof(cmd->data));
memcpy(cmd->data, arg, len);
ring->cur = (ring->cur + 1) % RUN_HOST_CMD_RING_COUNT;
@@ -1606,7 +1606,7 @@
/* do it in a process context */
cmd.state = nstate;
cmd.arg = arg;
- run_do_async(sc, run_newstate_cb, &cmd, sizeof cmd);
+ run_do_async(sc, run_newstate_cb, &cmd, sizeof(cmd));
return 0;
}
@@ -1682,7 +1682,7 @@
/* clear statistic registers used by AMRR */
run_read_region_1(sc, RT2860_TX_STA_CNT0,
- (uint8_t *)sta, sizeof sta);
+ (uint8_t *)sta, sizeof(sta));
/* start calibration timer */
callout_schedule(&sc->calib_to, hz);
}
@@ -1760,7 +1760,7 @@
/* do it in a process context */
cmd.key = *k;
cmd.associd = (ni != NULL) ? ni->ni_associd : 0;
- run_do_async(sc, run_set_key_cb, &cmd, sizeof cmd);
+ run_do_async(sc, run_set_key_cb, &cmd, sizeof(cmd));
return 1;
}
@@ -1825,7 +1825,7 @@
(k->wk_flags & IEEE80211_KEY_XMIT)) {
/* set initial packet number in IV+EIV */
if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_WEP) {
- memset(iv, 0, sizeof iv);
+ memset(iv, 0, sizeof(iv));
iv[3] = sc->sc_ic.ic_crypto.cs_def_txkey << 6;
Home |
Main Index |
Thread Index |
Old Index