PERFORCE change 136511 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Feb 29 19:48:31 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=136511
Change 136511 by hselasky at hselasky_laptop001 on 2008/02/29 19:20:10
Remove useless "+ 0" statements.
Affected files ...
.. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#34 edit
.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#72 edit
.. //depot/projects/usb/src/sys/dev/usb/if_aue.c#45 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#47 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cue.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kue.c#43 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rue.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rum.c#28 edit
.. //depot/projects/usb/src/sys/dev/usb/if_udav.c#43 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#53 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#37 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#59 edit
.. //depot/projects/usb/src/sys/dev/usb/uark.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/ubsa.c#38 edit
.. //depot/projects/usb/src/sys/dev/usb/ubser.c#30 edit
.. //depot/projects/usb/src/sys/dev/usb/uchcom.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/ucycom.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/udbp.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/ufoma.c#40 edit
.. //depot/projects/usb/src/sys/dev/usb/uftdi.c#35 edit
.. //depot/projects/usb/src/sys/dev/usb/ugen.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/ugensa.c#22 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci.c#60 edit
.. //depot/projects/usb/src/sys/dev/usb/uhid.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/uipaq.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/ukbd.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/ulpt.c#42 edit
.. //depot/projects/usb/src/sys/dev/usb/umass.c#44 edit
.. //depot/projects/usb/src/sys/dev/usb/umct.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/umodem.c#42 edit
.. //depot/projects/usb/src/sys/dev/usb/umoscom.c#18 edit
.. //depot/projects/usb/src/sys/dev/usb/ums.c#40 edit
.. //depot/projects/usb/src/sys/dev/usb/uplcom.c#40 edit
.. //depot/projects/usb/src/sys/dev/usb/urio.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#117 edit
.. //depot/projects/usb/src/sys/dev/usb/uscanner.c#25 edit
.. //depot/projects/usb/src/sys/dev/usb/uvisor.c#36 edit
.. //depot/projects/usb/src/sys/dev/usb/uvscom.c#38 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#27 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#22 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#34 (text) ====
@@ -491,7 +491,7 @@
req.wIndex[1] = 0;
USETW(req.wLength, 0);
- usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req));
+ usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
xfer->frlengths[0] = sizeof(req);
xfer->nframes = 1;
@@ -583,7 +583,7 @@
bzero(sc->cbw.cdb, 16);
bcopy(request->u.atapi.ccb, sc->cbw.cdb, 12); /* XXX SOS */
- usbd_copy_in(xfer->frbuffers + 0, 0, &(sc->cbw), sizeof(sc->cbw));
+ usbd_copy_in(xfer->frbuffers, 0, &(sc->cbw), sizeof(sc->cbw));
xfer->frlengths[0] = sizeof(sc->cbw);
usbd_start_hardware(xfer);
@@ -606,7 +606,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- usbd_copy_out(xfer->frbuffers + 0, 0,
+ usbd_copy_out(xfer->frbuffers, 0,
sc->ata_data, xfer->actlen);
sc->ata_bytecount -= xfer->actlen;
@@ -684,7 +684,7 @@
xfer->timeout = sc->timeout;
xfer->frlengths[0] = max_bulk;
- usbd_copy_in(xfer->frbuffers + 0, 0,
+ usbd_copy_in(xfer->frbuffers, 0,
sc->ata_data, max_bulk);
usbd_start_hardware(xfer);
@@ -722,7 +722,7 @@
if (xfer->actlen < sizeof(sc->csw)) {
bzero(&(sc->csw), sizeof(sc->csw));
}
- usbd_copy_out(xfer->frbuffers + 0, 0, &(sc->csw), xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, &(sc->csw), xfer->actlen);
if (request->flags & (ATA_R_READ | ATA_R_WRITE)) {
request->donecount = sc->ata_donecount;
==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#33 (text+ko) ====
@@ -1249,7 +1249,7 @@
if (n > total) {
n = total;
}
- usbd_copy_in(xfer->frbuffers + 0, offset, ch->cur, n);
+ usbd_copy_in(xfer->frbuffers, offset, ch->cur, n);
total -= n;
ch->cur += n;
@@ -1305,7 +1305,7 @@
if (m > p_len[n]) {
m = p_len[n];
}
- usbd_copy_out(xfer->frbuffers + 0, offset1, ch->cur, m);
+ usbd_copy_out(xfer->frbuffers, offset1, ch->cur, m);
p_len[n] -= m;
offset1 += m;
@@ -3032,7 +3032,7 @@
if (len > 1) {
buf[1] = (mc->wData[chan] >> 8) & 0xFF;
}
- usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req));
+ usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
usbd_copy_in(xfer->frbuffers + 1, 0, buf, len);
xfer->frlengths[0] = sizeof(req);
@@ -3279,14 +3279,14 @@
while (xfer->actlen >= 4) {
- usbd_copy_out(xfer->frbuffers + 0, pos, buf, 1);
+ usbd_copy_out(xfer->frbuffers, pos, buf, 1);
cmd_len = umidi_cmd_to_len[buf[0] & 0xF]; /* command length */
cn = buf[0] >> 4; /* cable number */
sub = &(chan->sub[cn]);
if (cmd_len && (cn < chan->max_cable) && sub->read_open) {
- usb_cdev_put_data(&(sub->cdev), xfer->frbuffers + 0,
+ usb_cdev_put_data(&(sub->cdev), xfer->frbuffers,
pos + 1, cmd_len, 1);
} else {
/* ignore the command */
@@ -3505,14 +3505,14 @@
sub = &(chan->sub[chan->curr_cable]);
if (sub->write_open) {
- usb_cdev_get_data(&(sub->cdev), xfer->frbuffers + 0,
+ usb_cdev_get_data(&(sub->cdev), xfer->frbuffers,
total_length, 1, &actlen, 0);
} else {
actlen = 0;
}
if (actlen) {
- usbd_copy_out(xfer->frbuffers + 0, total_length, &buf, 1);
+ usbd_copy_out(xfer->frbuffers, total_length, &buf, 1);
tr_any = 1;
@@ -3524,7 +3524,7 @@
sub->temp_cmd[0], sub->temp_cmd[1],
sub->temp_cmd[2], sub->temp_cmd[3]);
- usbd_copy_in(xfer->frbuffers + 0, total_length,
+ usbd_copy_in(xfer->frbuffers, total_length,
sub->temp_cmd, 4);
total_length += 4;
==== //depot/projects/usb/src/sys/dev/usb/ehci.c#72 (text+ko) ====
@@ -2528,14 +2528,14 @@
* only call "usbd_get_page()" when we have a
* non-zero length
*/
- usbd_get_page(xfer->frbuffers + 0, buf_offset, &buf_res);
+ usbd_get_page(xfer->frbuffers, buf_offset, &buf_res);
td->sitd_bp[0] = htole32(buf_res.physaddr);
buf_offset += *plen;
/*
* NOTE: We need to subtract one from the offset so
* that we are on a valid page!
*/
- usbd_get_page(xfer->frbuffers + 0, buf_offset - 1, &buf_res);
+ usbd_get_page(xfer->frbuffers, buf_offset - 1, &buf_res);
temp = buf_res.physaddr & ~0xFFF;
} else {
td->sitd_bp[0] = 0;
@@ -2824,7 +2824,7 @@
itd_offset[td_no] = buf_offset;
/* get first page offset */
- usbd_get_page(xfer->frbuffers + 0, itd_offset[0], &buf_res);
+ usbd_get_page(xfer->frbuffers, itd_offset[0], &buf_res);
/* get page address */
page_addr = buf_res.physaddr & ~0xFFF;
@@ -2841,9 +2841,9 @@
* we don't go off the last
* page!
*/
- usbd_get_page(xfer->frbuffers + 0, buf_offset - 1, &buf_res);
+ usbd_get_page(xfer->frbuffers, buf_offset - 1, &buf_res);
} else {
- usbd_get_page(xfer->frbuffers + 0, itd_offset[x + 1], &buf_res);
+ usbd_get_page(xfer->frbuffers, itd_offset[x + 1], &buf_res);
}
/* check if we need a new page */
==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#45 (text+ko) ====
@@ -1005,7 +1005,7 @@
if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
(xfer->actlen >= sizeof(pkt))) {
- usbd_copy_out(xfer->frbuffers + 0, 0, &pkt, sizeof(pkt));
+ usbd_copy_out(xfer->frbuffers, 0, &pkt, sizeof(pkt));
if (pkt.aue_txstat0) {
ifp->if_oerrors++;
@@ -1071,7 +1071,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, xfer->actlen - 4, &(sc->sc_rxpkt),
+ usbd_copy_out(xfer->frbuffers, xfer->actlen - 4, &(sc->sc_rxpkt),
sizeof(sc->sc_rxpkt));
/*
@@ -1096,7 +1096,7 @@
}
xfer->actlen = min(xfer->actlen, m->m_len);
- usbd_copy_out(xfer->frbuffers + 0, 0, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, m->m_data, xfer->actlen);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
@@ -1189,7 +1189,7 @@
xfer->frlengths[0] = m->m_pkthdr.len;
- usbd_m_copy_in(xfer->frbuffers + 0, 0,
+ usbd_m_copy_in(xfer->frbuffers, 0,
m, 0, m->m_pkthdr.len);
} else {
@@ -1205,9 +1205,9 @@
buf[0] = (uint8_t)(m->m_pkthdr.len);
buf[1] = (uint8_t)(m->m_pkthdr.len >> 8);
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 2);
- usbd_m_copy_in(xfer->frbuffers + 0, 2,
+ usbd_m_copy_in(xfer->frbuffers, 2,
m, 0, m->m_pkthdr.len);
}
==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#47 (text+ko) ====
@@ -1040,7 +1040,7 @@
/* too little data */
break;
}
- usbd_copy_out(xfer->frbuffers + 0, pos, &hdr, sizeof(hdr));
+ usbd_copy_out(xfer->frbuffers, pos, &hdr, sizeof(hdr));
if ((hdr.len ^ hdr.ilen) != 0xFFFF) {
/* we lost sync */
@@ -1073,7 +1073,7 @@
if (m->m_len > len) {
m->m_len = len;
}
- usbd_copy_out(xfer->frbuffers + 0, pos, m->m_data, m->m_len);
+ usbd_copy_out(xfer->frbuffers, pos, m->m_data, m->m_len);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
@@ -1209,7 +1209,7 @@
hdr.len = htole16(m->m_pkthdr.len);
hdr.ilen = ~hdr.len;
- usbd_copy_in(xfer->frbuffers + 0, pos, &hdr, sizeof(hdr));
+ usbd_copy_in(xfer->frbuffers, pos, &hdr, sizeof(hdr));
pos += sizeof(hdr);
@@ -1221,7 +1221,7 @@
* USBD_FORCE_SHORT_XFER flag instead.
*/
}
- usbd_m_copy_in(xfer->frbuffers + 0, pos,
+ usbd_m_copy_in(xfer->frbuffers, pos,
m, 0, m->m_pkthdr.len);
pos += m->m_pkthdr.len;
==== //depot/projects/usb/src/sys/dev/usb/if_cue.c#41 (text+ko) ====
@@ -652,7 +652,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 2);
len = buf[0] | (buf[1] << 8);
@@ -667,7 +667,7 @@
xfer->actlen = min(xfer->actlen, m->m_len);
xfer->actlen = min(xfer->actlen, len);
- usbd_copy_out(xfer->frbuffers + 0, 2, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 2, m->m_data, xfer->actlen);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
@@ -810,9 +810,9 @@
buf[0] = (uint8_t)(m->m_pkthdr.len);
buf[1] = (uint8_t)(m->m_pkthdr.len >> 8);
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 2);
- usbd_m_copy_in(xfer->frbuffers + 0, 2,
+ usbd_m_copy_in(xfer->frbuffers, 2,
m, 0, m->m_pkthdr.len);
/*
==== //depot/projects/usb/src/sys/dev/usb/if_kue.c#43 (text+ko) ====
@@ -690,7 +690,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 2);
len = buf[0] | (buf[1] << 8);
@@ -705,7 +705,7 @@
xfer->actlen = min(xfer->actlen, m->m_len);
xfer->actlen = min(xfer->actlen, len);
- usbd_copy_out(xfer->frbuffers + 0, 2, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 2, m->m_data, xfer->actlen);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
@@ -798,12 +798,12 @@
buf[0] = (uint8_t)(m->m_pkthdr.len);
buf[1] = (uint8_t)(m->m_pkthdr.len >> 8);
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 2);
- usbd_m_copy_in(xfer->frbuffers + 0, 2,
+ usbd_m_copy_in(xfer->frbuffers, 2,
m, 0, m->m_pkthdr.len);
- usbd_bzero(xfer->frbuffers + 0, temp_len,
+ usbd_bzero(xfer->frbuffers, temp_len,
total_len - temp_len);
xfer->frlengths[0] = total_len;
==== //depot/projects/usb/src/sys/dev/usb/if_rue.c#41 (text+ko) ====
@@ -901,7 +901,7 @@
if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
(xfer->actlen >= sizeof(pkt))) {
- usbd_copy_out(xfer->frbuffers + 0, 0, &pkt, sizeof(pkt));
+ usbd_copy_out(xfer->frbuffers, 0, &pkt, sizeof(pkt));
ifp->if_ierrors += pkt.rue_rxlost_cnt;
ifp->if_ierrors += pkt.rue_crcerr_cnt;
@@ -955,7 +955,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, xfer->actlen - 4,
+ usbd_copy_out(xfer->frbuffers, xfer->actlen - 4,
&status, sizeof(status));
status = le16toh(status);
@@ -980,7 +980,7 @@
}
xfer->actlen = min(xfer->actlen, m->m_len);
- usbd_copy_out(xfer->frbuffers + 0, 0, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, m->m_data, xfer->actlen);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
@@ -1071,7 +1071,7 @@
}
temp_len = m->m_pkthdr.len;
- usbd_m_copy_in(xfer->frbuffers + 0, 0,
+ usbd_m_copy_in(xfer->frbuffers, 0,
m, 0, m->m_pkthdr.len);
/*
@@ -1080,7 +1080,7 @@
* RUE_MIN_FRAMELEN (60) byte packet.
*/
if (temp_len < RUE_MIN_FRAMELEN) {
- usbd_bzero(xfer->frbuffers + 0, temp_len,
+ usbd_bzero(xfer->frbuffers, temp_len,
RUE_MIN_FRAMELEN - temp_len);
temp_len = RUE_MIN_FRAMELEN;
}
==== //depot/projects/usb/src/sys/dev/usb/if_rum.c#28 (text+ko) ====
@@ -1048,7 +1048,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0,
+ usbd_copy_out(xfer->frbuffers, 0,
&(sc->sc_rx_desc), RT2573_RX_DESC_SIZE);
flags = le32toh(sc->sc_rx_desc.flags);
@@ -1072,7 +1072,7 @@
}
max_len = (xfer->actlen - RT2573_RX_DESC_SIZE);
- usbd_copy_out(xfer->frbuffers + 0, RT2573_RX_DESC_SIZE,
+ usbd_copy_out(xfer->frbuffers, RT2573_RX_DESC_SIZE,
m->m_data, max_len);
/* finalize mbuf */
@@ -1407,10 +1407,10 @@
}
rum_setup_tx_desc(sc, flags, 0, m->m_pkthdr.len, rate);
- usbd_copy_in(xfer->frbuffers + 0, 0, &(sc->sc_tx_desc),
+ usbd_copy_in(xfer->frbuffers, 0, &(sc->sc_tx_desc),
RT2573_TX_DESC_SIZE);
- usbd_m_copy_in(xfer->frbuffers + 0, RT2573_TX_DESC_SIZE,
+ usbd_m_copy_in(xfer->frbuffers, RT2573_TX_DESC_SIZE,
m, 0, m->m_pkthdr.len);
/* compute transfer length */
@@ -1420,13 +1420,13 @@
if (temp_len & 3) {
align = (-(temp_len)) & 3;
/* zero the extra byte(s) */
- usbd_bzero(xfer->frbuffers + 0, temp_len, align);
+ usbd_bzero(xfer->frbuffers, temp_len, align);
temp_len += align;
}
/* check if we need to add four extra bytes */
if ((temp_len % 64) == 0) {
/* zero the extra bytes */
- usbd_bzero(xfer->frbuffers + 0, temp_len, 4);
+ usbd_bzero(xfer->frbuffers, temp_len, 4);
temp_len += 4;
}
DPRINTF(sc, 10, "sending frame len=%u rate=%u xferlen=%u\n",
==== //depot/projects/usb/src/sys/dev/usb/if_udav.c#43 (text+ko) ====
@@ -925,13 +925,13 @@
temp_len += 2;
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 2);
- usbd_m_copy_in(xfer->frbuffers + 0, 2,
+ usbd_m_copy_in(xfer->frbuffers, 2,
m, 0, m->m_pkthdr.len);
if (extra_len) {
- usbd_bzero(xfer->frbuffers + 0, temp_len - extra_len,
+ usbd_bzero(xfer->frbuffers, temp_len - extra_len,
extra_len);
}
/*
@@ -995,7 +995,7 @@
}
xfer->actlen -= 1;
- usbd_copy_out(xfer->frbuffers + 0, 0, &status, 1);
+ usbd_copy_out(xfer->frbuffers, 0, &status, 1);
if (status & UDAV_RSR_LCS) {
ifp->if_collisions++;
@@ -1005,7 +1005,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 1, &total_len, 2);
+ usbd_copy_out(xfer->frbuffers, 1, &total_len, 2);
total_len = le16toh(total_len);
@@ -1027,7 +1027,7 @@
}
xfer->actlen = min(xfer->actlen, m->m_len);
- usbd_copy_out(xfer->frbuffers + 0, 3, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 3, m->m_data, xfer->actlen);
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#53 (text+ko) ====
@@ -1052,7 +1052,7 @@
}
max_len = (xfer->actlen - RAL_RX_DESC_SIZE);
- usbd_copy_out(xfer->frbuffers + 0, max_len,
+ usbd_copy_out(xfer->frbuffers, max_len,
&(sc->sc_rx_desc), RAL_RX_DESC_SIZE);
flags = le32toh(sc->sc_rx_desc.flags);
@@ -1088,7 +1088,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, m->m_data, max_len);
+ usbd_copy_out(xfer->frbuffers, 0, m->m_data, max_len);
/* finalize mbuf */
m->m_pkthdr.rcvif = ifp;
@@ -1422,10 +1422,10 @@
}
ural_setup_tx_desc(sc, flags, m->m_pkthdr.len, rate);
- usbd_copy_in(xfer->frbuffers + 0, 0, &(sc->sc_tx_desc),
+ usbd_copy_in(xfer->frbuffers, 0, &(sc->sc_tx_desc),
RAL_TX_DESC_SIZE);
- usbd_m_copy_in(xfer->frbuffers + 0, RAL_TX_DESC_SIZE,
+ usbd_m_copy_in(xfer->frbuffers, RAL_TX_DESC_SIZE,
m, 0, m->m_pkthdr.len);
/* compute transfer length */
@@ -1434,13 +1434,13 @@
/* make transfer length 16-bit aligned */
if (temp_len & 1) {
/* zero the extra byte */
- usbd_bzero(xfer->frbuffers + 0, temp_len, 1);
+ usbd_bzero(xfer->frbuffers, temp_len, 1);
temp_len++;
}
/* check if we need to add two extra bytes */
if ((temp_len % 64) == 0) {
/* zero the extra bytes */
- usbd_bzero(xfer->frbuffers + 0, temp_len, 2);
+ usbd_bzero(xfer->frbuffers, temp_len, 2);
temp_len += 2;
}
DPRINTF(sc, 10, "sending frame len=%u rate=%u xferlen=%u\n",
@@ -1492,7 +1492,7 @@
if (sc->sc_flags & URAL_FLAG_SEND_BYTE_FRAME) {
sc->sc_flags &= ~URAL_FLAG_SEND_BYTE_FRAME;
- usbd_bzero(xfer->frbuffers + 0, 0, 1);
+ usbd_bzero(xfer->frbuffers, 0, 1);
xfer->frlengths[0] = 1; /* bytes */
==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#37 (text+ko) ====
@@ -420,7 +420,7 @@
if (actlen > sizeof(sc->sc_intr_ibuf)) {
actlen = sizeof(sc->sc_intr_ibuf);
}
- usbd_copy_out(xfer->frbuffers + 0, 0,
+ usbd_copy_out(xfer->frbuffers, 0,
&(sc->sc_intr_ibuf), actlen);
switch (cmd->code) {
@@ -626,7 +626,7 @@
goto wakeup;
}
if (sc->sc_intr_owakeup) {
- usbd_copy_in(xfer->frbuffers + 0, 0, &(sc->sc_intr_obuf),
+ usbd_copy_in(xfer->frbuffers, 0, &(sc->sc_intr_obuf),
sc->sc_intr_olen);
xfer->frlengths[0] = sc->sc_intr_olen;
@@ -818,8 +818,8 @@
ifp->if_ierrors++;
return;
}
- usbd_copy_out(xfer->frbuffers + 0, offset, &plcp, sizeof(plcp));
- usbd_copy_out(xfer->frbuffers + 0, offset + len - sizeof(stat),
+ usbd_copy_out(xfer->frbuffers, offset, &plcp, sizeof(plcp));
+ usbd_copy_out(xfer->frbuffers, offset + len - sizeof(stat),
&stat, sizeof(stat));
if (stat.flags & ZYD_RX_ERROR) {
@@ -850,7 +850,7 @@
m->m_pkthdr.len = len;
m->m_len = len;
- usbd_copy_out(xfer->frbuffers + 0, offset +
+ usbd_copy_out(xfer->frbuffers, offset +
sizeof(plcp), m->m_data, len);
if (bpf_peers_present(sc->sc_drvbpf)) {
@@ -900,7 +900,7 @@
ifp->if_ierrors++;
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, xfer->actlen - sizeof(rx_desc),
+ usbd_copy_out(xfer->frbuffers, xfer->actlen - sizeof(rx_desc),
&rx_desc, sizeof(rx_desc));
if (UGETW(rx_desc.tag) == ZYD_TAG_MULTIFRAME) {
@@ -2706,9 +2706,9 @@
bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m);
}
- usbd_copy_in(xfer->frbuffers + 0, 0, &(tx_desc), sizeof(tx_desc));
+ usbd_copy_in(xfer->frbuffers, 0, &(tx_desc), sizeof(tx_desc));
- usbd_m_copy_in(xfer->frbuffers + 0, sizeof(tx_desc),
+ usbd_m_copy_in(xfer->frbuffers, sizeof(tx_desc),
m, 0, m->m_pkthdr.len);
/* compute transfer length */
==== //depot/projects/usb/src/sys/dev/usb/ohci.c#59 (text+ko) ====
@@ -2005,12 +2005,12 @@
htole16(OHCI_ITD_MK_OFFS(0));
}
} else {
- usbd_get_page(xfer->frbuffers + 0, buf_offset - length, &buf_res);
+ usbd_get_page(xfer->frbuffers, buf_offset - length, &buf_res);
length = OHCI_PAGE_MASK(buf_res.physaddr);
buf_res.physaddr =
OHCI_PAGE(buf_res.physaddr);
td->itd_bp0 = htole32(buf_res.physaddr);
- usbd_get_page(xfer->frbuffers + 0, buf_offset - 1, &buf_res);
+ usbd_get_page(xfer->frbuffers, buf_offset - 1, &buf_res);
td->itd_be = htole32(buf_res.physaddr);
while (ncur--) {
==== //depot/projects/usb/src/sys/dev/usb/uark.c#21 (text+ko) ====
@@ -269,7 +269,7 @@
usbd_transfer_start(sc->sc_xfer[2]);
return;
}
- if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers, 0,
UARK_BUF_SIZE, &actlen)) {
xfer->frlengths[0] = actlen;
usbd_start_hardware(xfer);
@@ -307,7 +307,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers, 0,
xfer->actlen);
case USBD_ST_SETUP:
==== //depot/projects/usb/src/sys/dev/usb/ubsa.c#38 (text+ko) ====
@@ -644,7 +644,7 @@
usbd_transfer_start(sc->sc_xfer[2]);
return;
}
- if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers, 0,
UBSA_BSIZE, &actlen)) {
xfer->frlengths[0] = actlen;
@@ -683,7 +683,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0, xfer->actlen);
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers, 0, xfer->actlen);
case USBD_ST_SETUP:
if (sc->sc_flag & UBSA_FLAG_READ_STALL) {
@@ -729,7 +729,7 @@
if (xfer->actlen >= sizeof(buf)) {
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, sizeof(buf));
+ usbd_copy_out(xfer->frbuffers, 0, buf, sizeof(buf));
/*
* incidentally, Belkin adapter status bits match
==== //depot/projects/usb/src/sys/dev/usb/ubser.c#30 (text+ko) ====
@@ -454,12 +454,12 @@
}
do {
if (ucom_get_data(sc->sc_ucom + sc->sc_curr_tx_unit,
- xfer->frbuffers + 0, 1, sc->sc_tx_size - 1,
+ xfer->frbuffers, 1, sc->sc_tx_size - 1,
&actlen)) {
buf[0] = sc->sc_curr_tx_unit;
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 1);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 1);
xfer->frlengths[0] = actlen + 1;
usbd_start_hardware(xfer);
@@ -510,14 +510,14 @@
DPRINTF(sc, 0, "invalid actlen=0!\n");
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 1);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 1);
if (buf[0] >= sc->sc_numser) {
DPRINTF(sc, 0, "invalid serial number!\n");
goto tr_setup;
}
ucom_put_data(sc->sc_ucom + buf[0],
- xfer->frbuffers + 0, 1, xfer->actlen - 1);
+ xfer->frbuffers, 1, xfer->actlen - 1);
case USBD_ST_SETUP:
tr_setup:
==== //depot/projects/usb/src/sys/dev/usb/uchcom.c#23 (text+ko) ====
@@ -894,7 +894,7 @@
DPRINTFN(0, "actlen = %u\n", xfer->actlen);
if (xfer->actlen >= UCHCOM_INTR_LEAST) {
- usbd_copy_out(xfer->frbuffers + 0, 0, buf,
+ usbd_copy_out(xfer->frbuffers, 0, buf,
UCHCOM_INTR_LEAST);
DPRINTFN(0, "data = 0x%02X 0x%02X 0x%02X 0x%02X\n",
@@ -950,7 +950,7 @@
usbd_transfer_start(sc->sc_xfer[2]);
return;
}
- if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers, 0,
UCHCOM_BULK_BUF_SIZE, &actlen)) {
DPRINTFN(0, "actlen = %d\n", actlen);
@@ -991,7 +991,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0, xfer->actlen);
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers, 0, xfer->actlen);
case USBD_ST_SETUP:
if (sc->sc_flag & UCHCOM_FLAG_READ_STALL) {
==== //depot/projects/usb/src/sys/dev/usb/ucycom.c#33 (text+ko) ====
@@ -433,7 +433,7 @@
break;
}
- usbd_copy_in(xfer->frbuffers + 0, 0, &(req), sizeof(req));
+ usbd_copy_in(xfer->frbuffers, 0, &(req), sizeof(req));
usbd_copy_in(xfer->frbuffers + 1, 0, data, offset);
xfer->frlengths[0] = sizeof(req);
@@ -585,7 +585,7 @@
if (xfer->actlen < 1) {
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 1);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 1);
sc->sc_ist = buf[0] & ~0x07;
len = buf[0] & 0x07;
@@ -600,7 +600,7 @@
if (xfer->actlen < 2) {
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 2);
sc->sc_ist = buf[0] & ~0x07;
len = buf[1];
@@ -620,7 +620,7 @@
len = xfer->actlen;
}
if (len) {
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0,
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers,
offset, len);
}
case USBD_ST_SETUP:
==== //depot/projects/usb/src/sys/dev/usb/udbp.c#26 (text+ko) ====
@@ -432,7 +432,7 @@
}
m->m_pkthdr.len = m->m_len = xfer->actlen;
- usbd_copy_out(xfer->frbuffers + 0, 0, m->m_data, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, m->m_data, xfer->actlen);
sc->sc_bulk_in_buffer = m;
@@ -552,7 +552,7 @@
MCLBYTES);
m->m_pkthdr.len = MCLBYTES;
}
- usbd_m_copy_in(xfer->frbuffers + 0, 0, m, 0, m->m_pkthdr.len);
+ usbd_m_copy_in(xfer->frbuffers, 0, m, 0, m->m_pkthdr.len);
xfer->frlengths[0] = m->m_pkthdr.len;
==== //depot/projects/usb/src/sys/dev/usb/ufoma.c#40 (text+ko) ====
@@ -595,7 +595,7 @@
USETW(req.wValue, 0);
USETW(req.wLength, UFOMA_CMD_BUF_SIZE);
- usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req));
+ usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
xfer->frlengths[0] = sizeof(req);
xfer->frlengths[1] = UFOMA_CMD_BUF_SIZE;
@@ -639,7 +639,7 @@
USETW(req.wValue, 0);
USETW(req.wLength, 1);
- usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req));
+ usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
xfer->frlengths[0] = sizeof(req);
xfer->frlengths[1] = 1;
@@ -696,7 +696,7 @@
DPRINTF(sc, 0, "truncating message\n");
xfer->actlen = sizeof(pkt);
}
- usbd_copy_out(xfer->frbuffers + 0, 0, &pkt, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, &pkt, xfer->actlen);
xfer->actlen -= 8;
@@ -801,7 +801,7 @@
usbd_transfer_start(sc->sc_bulk_xfer[2]);
return;
}
- if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers, 0,
UFOMA_BULK_BUF_SIZE, &actlen)) {
xfer->frlengths[0] = actlen;
usbd_start_hardware(xfer);
@@ -839,7 +839,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0, 0,
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers, 0,
xfer->actlen);
case USBD_ST_SETUP:
==== //depot/projects/usb/src/sys/dev/usb/uftdi.c#35 (text+ko) ====
@@ -545,14 +545,14 @@
usbd_transfer_start(sc->sc_xfer[2]);
return;
}
- if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers + 0,
+ if (ucom_get_data(&(sc->sc_ucom), xfer->frbuffers,
sc->sc_hdrlen, UFTDI_OBUFSIZE - sc->sc_hdrlen,
&actlen)) {
if (sc->sc_hdrlen > 0) {
buf[0] =
FTDI_OUT_TAG(actlen, sc->sc_ucom.sc_portno);
- usbd_copy_in(xfer->frbuffers + 0, 0, buf, 1);
+ usbd_copy_in(xfer->frbuffers, 0, buf, 1);
}
xfer->frlengths[0] = actlen + sc->sc_hdrlen;
usbd_start_hardware(xfer);
@@ -597,7 +597,7 @@
if (xfer->actlen < 2) {
goto tr_setup;
}
- usbd_copy_out(xfer->frbuffers + 0, 0, buf, 2);
+ usbd_copy_out(xfer->frbuffers, 0, buf, 2);
msr = FTDI_GET_MSR(buf);
lsr = FTDI_GET_LSR(buf);
@@ -616,7 +616,7 @@
xfer->actlen -= 2;
if (xfer->actlen > 0) {
- ucom_put_data(&(sc->sc_ucom), xfer->frbuffers + 0, 2,
+ ucom_put_data(&(sc->sc_ucom), xfer->frbuffers, 2,
xfer->actlen);
}
case USBD_ST_SETUP:
==== //depot/projects/usb/src/sys/dev/usb/ugen.c#39 (text+ko) ====
@@ -1029,7 +1029,7 @@
PRINTFN(1, ("got %d of %d bytes\n", xfer->actlen, n));
error = ugen_usb_uiomove
- (sc, sce, xfer->frbuffers + 0, uio, 0,
+ (sc, sce, xfer->frbuffers, uio, 0,
xfer->actlen, UGEN_RD_UIO);
if (error || (xfer->actlen < n)) {
@@ -1092,7 +1092,7 @@
xfer = sce->xfer_out[0];
error = ugen_usb_uiomove
- (sc, sce, xfer->frbuffers + 0, uio,
+ (sc, sce, xfer->frbuffers, uio,
0, n, UGEN_WR_UIO);
if (error) {
@@ -1302,7 +1302,7 @@
if (ptr == NULL) {
PRINTFN(5, ("dropping one packet, sce=%p\n", sce));
} else {
- usbd_copy_out(xfer->frbuffers + 0, 0, ptr, xfer->actlen);
+ usbd_copy_out(xfer->frbuffers, 0, ptr, xfer->actlen);
if (xfer->actlen > *plen) {
xfer->actlen = *plen;
@@ -1406,7 +1406,7 @@
if (*plen1 > *plen2) {
*plen1 = *plen2;
}
- usbd_copy_out(xfer->frbuffers + 0, offset,
+ usbd_copy_out(xfer->frbuffers, offset,
ptr2, *plen1);
*plen2 = *plen1;
@@ -1469,7 +1469,7 @@
if (len2 > xfer->max_frame_size) {
len2 = xfer->max_frame_size;
}
- usbd_copy_in(xfer->frbuffers + 0, offset, ptr2, len2);
+ usbd_copy_in(xfer->frbuffers, offset, ptr2, len2);
*plen1 = len2;
==== //depot/projects/usb/src/sys/dev/usb/ugensa.c#22 (text+ko) ====
@@ -299,7 +299,7 @@
usbd_transfer_start(ssc->sc_xfer[2]);
return;
}
- if (ucom_get_data(ssc->sc_ucom_ptr, xfer->frbuffers + 0, 0,
+ if (ucom_get_data(ssc->sc_ucom_ptr, xfer->frbuffers, 0,
UGENSA_BUF_SIZE, &actlen)) {
xfer->frlengths[0] = actlen;
usbd_start_hardware(xfer);
@@ -337,7 +337,7 @@
switch (USBD_GET_STATE(xfer)) {
case USBD_ST_TRANSFERRED:
- ucom_put_data(ssc->sc_ucom_ptr, xfer->frbuffers + 0, 0,
+ ucom_put_data(ssc->sc_ucom_ptr, xfer->frbuffers, 0,
xfer->actlen);
case USBD_ST_SETUP:
==== //depot/projects/usb/src/sys/dev/usb/uhci.c#60 (text+ko) ====
@@ -1069,7 +1069,7 @@
usbd_pc_cpu_invalidate(td->fix_pc);
- usbd_copy_in(xfer->frbuffers + 0, offset,
+ usbd_copy_in(xfer->frbuffers, offset,
res.buffer, len);
}
offset += *plen;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list