diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2011-06-22 16:44:30 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2011-06-22 16:44:30 +0000 |
commit | 1f661be9ea73176bec91c937d3ee550778ac8399 (patch) | |
tree | 6b6bf0b7f749066df7ba6a2cda59cd58b39a3ae2 /sys/dev | |
parent | 170dc45699ecadd925be6b0b76cffb9ba9accba0 (diff) |
kill a few more casts that aren't helpful. ok krw miod
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_bge.c | 20 | ||||
-rw-r--r-- | sys/dev/pci/if_bnx.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_lge.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/if_msk.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_nge.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_sis.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_sk.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_ste.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_tl.c | 14 | ||||
-rw-r--r-- | sys/dev/pci/if_vge.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/if_vr.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_wb.c | 12 | ||||
-rw-r--r-- | sys/dev/usb/if_wi_usb.c | 7 |
13 files changed, 64 insertions, 81 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 711c70e39e0..8caa1978a0e 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.306 2011/04/05 18:01:21 henning Exp $ */ +/* $OpenBSD: if_bge.c,v 1.307 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -866,7 +866,7 @@ bge_init_rx_ring_std(struct bge_softc *sc) sc->bge_dev.dv_xname, i); goto uncreate; } - bzero((char *)&sc->bge_rdata->bge_rx_std_ring[i], + bzero(&sc->bge_rdata->bge_rx_std_ring[i], sizeof(struct bge_rx_bd)); } @@ -952,7 +952,7 @@ bge_free_rx_ring_std(struct bge_softc *sc) } bus_dmamap_destroy(sc->bge_dmatag, dmap); sc->bge_cdata.bge_rx_std_map[i] = NULL; - bzero((char *)&sc->bge_rdata->bge_rx_std_ring[i], + bzero(&sc->bge_rdata->bge_rx_std_ring[i], sizeof(struct bge_rx_bd)); } @@ -976,7 +976,7 @@ bge_init_rx_ring_jumbo(struct bge_softc *sc) sc->bge_dev.dv_xname, i); goto uncreate; } - bzero((char *)&sc->bge_rdata->bge_rx_jumbo_ring[i], + bzero(&sc->bge_rdata->bge_rx_jumbo_ring[i], sizeof(struct bge_ext_rx_bd)); } @@ -1051,7 +1051,7 @@ bge_free_rx_ring_jumbo(struct bge_softc *sc) } bus_dmamap_destroy(sc->bge_dmatag, dmap); sc->bge_cdata.bge_rx_jumbo_map[i] = NULL; - bzero((char *)&sc->bge_rdata->bge_rx_jumbo_ring[i], + bzero(&sc->bge_rdata->bge_rx_jumbo_ring[i], sizeof(struct bge_ext_rx_bd)); } @@ -1075,7 +1075,7 @@ bge_free_tx_ring(struct bge_softc *sc) link); sc->txdma[i] = 0; } - bzero((char *)&sc->bge_rdata->bge_tx_ring[i], + bzero(&sc->bge_rdata->bge_tx_ring[i], sizeof(struct bge_tx_bd)); } @@ -2907,9 +2907,7 @@ bge_compact_dma_runt(struct mbuf *pkt) /* Internal frag. If fits in prev, copy it there. */ if (prev && M_TRAILINGSPACE(prev) >= m->m_len) { - bcopy(m->m_data, - prev->m_data+prev->m_len, - mlen); + bcopy(m->m_data, prev->m_data+prev->m_len, mlen); prev->m_len += mlen; m->m_len = 0; /* XXX stitch chain */ @@ -2921,9 +2919,7 @@ bge_compact_dma_runt(struct mbuf *pkt) m->m_next->m_len >= (8 + shortfall)) { /* m is writable and have enough data in next, pull up. */ - bcopy(m->m_next->m_data, - m->m_data+m->m_len, - shortfall); + bcopy(m->m_next->m_data, m->m_data+m->m_len, shortfall); m->m_len += shortfall; m->m_next->m_len -= shortfall; m->m_next->m_data += shortfall; diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 063275476b3..c92e471f58e 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.94 2011/04/18 04:27:31 dlg Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.95 2011/06/22 16:44:27 tedu Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -3914,7 +3914,7 @@ bnx_free_tx_chain(struct bnx_softc *sc) /* Clear each TX chain page. */ for (i = 0; i < TX_PAGES; i++) - bzero((char *)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ); + bzero(sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ); sc->used_tx_bd = 0; @@ -4130,7 +4130,7 @@ bnx_free_rx_chain(struct bnx_softc *sc) /* Clear each RX chain page. */ for (i = 0; i < RX_PAGES; i++) - bzero((char *)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ); + bzero(sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ); sc->free_rx_bd = sc->max_rx_bd; diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index dc2f3e80dd3..5390a9718a0 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.54 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: if_lge.c,v 1.55 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -499,7 +499,7 @@ lge_attach(struct device *parent, struct device *self, void *aux) */ printf(", address %s\n", ether_sprintf(eaddr)); - bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + bcopy(eaddr, &sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); sc->sc_dmatag = pa->pa_dmat; DPRINTFN(5, ("bus_dmamem_alloc\n")); @@ -1480,8 +1480,7 @@ lge_stop(struct lge_softc *sc) sc->lge_ldata->lge_rx_list[i].lge_mbuf = NULL; } } - bzero((char *)&sc->lge_ldata->lge_rx_list, - sizeof(sc->lge_ldata->lge_rx_list)); + bzero(&sc->lge_ldata->lge_rx_list, sizeof(sc->lge_ldata->lge_rx_list)); /* * Free the TX list buffers. @@ -1493,6 +1492,5 @@ lge_stop(struct lge_softc *sc) } } - bzero((char *)&sc->lge_ldata->lge_tx_list, - sizeof(sc->lge_ldata->lge_tx_list)); + bzero(&sc->lge_ldata->lge_tx_list, sizeof(sc->lge_ldata->lge_tx_list)); } diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index d938ad27321..de9eb71dc8c 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.92 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: if_msk.c,v 1.93 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -430,8 +430,7 @@ msk_init_rx_ring(struct sk_if_softc *sc_if) struct msk_ring_data *rd = sc_if->sk_rdata; int i, nexti; - bzero((char *)rd->sk_rx_ring, - sizeof(struct msk_rx_desc) * MSK_RX_RING_CNT); + bzero(rd->sk_rx_ring, sizeof(struct msk_rx_desc) * MSK_RX_RING_CNT); for (i = 0; i < MSK_RX_RING_CNT; i++) { cd->sk_rx_chain[i].sk_le = &rd->sk_rx_ring[i]; @@ -460,7 +459,7 @@ msk_init_tx_ring(struct sk_if_softc *sc_if) struct sk_txmap_entry *entry; int i, nexti; - bzero((char *)sc_if->sk_rdata->sk_tx_ring, + bzero(sc_if->sk_rdata->sk_tx_ring, sizeof(struct msk_tx_desc) * MSK_TX_RING_CNT); SIMPLEQ_INIT(&sc_if->sk_txmap_head); @@ -771,7 +770,7 @@ mskc_reset(struct sk_softc *sc) } /* Reset status ring. */ - bzero((char *)sc->sk_status_ring, + bzero(sc->sk_status_ring, MSK_STATUS_RING_CNT * sizeof(struct msk_status_desc)); sc->sk_status_idx = 0; diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index 9b518cb08bb..d85594f779b 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.70 2010/09/20 07:40:38 deraadt Exp $ */ +/* $OpenBSD: if_nge.c,v 1.71 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -540,7 +540,7 @@ nge_miibus_readreg(dev, phy, reg) DPRINTFN(9, ("%s: nge_miibus_readreg\n", sc->sc_dv.dv_xname)); - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -560,7 +560,7 @@ nge_miibus_writereg(dev, phy, reg, data) DPRINTFN(9, ("%s: nge_miibus_writereg\n", sc->sc_dv.dv_xname)); - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -828,7 +828,7 @@ nge_attach(parent, self, aux) */ printf(", address %s\n", ether_sprintf(eaddr)); - bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + bcopy(eaddr, &sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); sc->sc_dmatag = pa->pa_dmat; DPRINTFN(5, ("%s: bus_dmamem_alloc\n", sc->sc_dv.dv_xname)); @@ -2202,7 +2202,7 @@ nge_stop(sc) sc->nge_ldata->nge_rx_list[i].nge_mbuf = NULL; } } - bzero((char *)&sc->nge_ldata->nge_rx_list, + bzero(&sc->nge_ldata->nge_rx_list, sizeof(sc->nge_ldata->nge_rx_list)); /* @@ -2215,7 +2215,7 @@ nge_stop(sc) } } - bzero((char *)&sc->nge_ldata->nge_tx_list, + bzero(&sc->nge_ldata->nge_tx_list, sizeof(sc->nge_ldata->nge_tx_list)); } diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 6a97c8cb2ef..60fecc63595 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.104 2011/04/14 06:27:52 dlg Exp $ */ +/* $OpenBSD: if_sis.c,v 1.105 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -607,7 +607,7 @@ sis_miibus_readreg(struct device *self, int phy, int reg) return (val); } else { - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -655,7 +655,7 @@ sis_miibus_writereg(struct device *self, int phy, int reg, int data) printf("%s: PHY failed to come ready\n", sc->sc_dev.dv_xname); } else { - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -1017,7 +1017,7 @@ sis_attach(struct device *parent, struct device *self, void *aux) tmp[2] = letoh16(sis_reverse(tmp[2])); tmp[1] = letoh16(sis_reverse(tmp[1])); - bcopy((char *)&tmp[1], sc->arpcom.ac_enaddr, + bcopy(&tmp[1], sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); } break; @@ -1980,7 +1980,7 @@ sis_stop(struct sis_softc *sc) m_freem(sc->sis_ldata->sis_rx_list[i].sis_mbuf); sc->sis_ldata->sis_rx_list[i].sis_mbuf = NULL; } - bzero((char *)&sc->sis_ldata->sis_rx_list[i], + bzero(&sc->sis_ldata->sis_rx_list[i], sizeof(struct sis_desc) - sizeof(bus_dmamap_t)); } @@ -1999,7 +1999,7 @@ sis_stop(struct sis_softc *sc) m_freem(sc->sis_ldata->sis_tx_list[i].sis_mbuf); sc->sis_ldata->sis_tx_list[i].sis_mbuf = NULL; } - bzero((char *)&sc->sis_ldata->sis_tx_list[i], + bzero(&sc->sis_ldata->sis_tx_list[i], sizeof(struct sis_desc) - sizeof(bus_dmamap_t)); } } diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 8a4878f527a..d5a0df10651 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.159 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: if_sk.c,v 1.160 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -558,8 +558,7 @@ sk_init_rx_ring(struct sk_if_softc *sc_if) struct sk_ring_data *rd = sc_if->sk_rdata; int i, nexti; - bzero((char *)rd->sk_rx_ring, - sizeof(struct sk_rx_desc) * SK_RX_RING_CNT); + bzero(rd->sk_rx_ring, sizeof(struct sk_rx_desc) * SK_RX_RING_CNT); for (i = 0; i < SK_RX_RING_CNT; i++) { cd->sk_rx_chain[i].sk_desc = &rd->sk_rx_ring[i]; @@ -599,7 +598,7 @@ sk_init_tx_ring(struct sk_if_softc *sc_if) struct sk_txmap_entry *entry; int i, nexti; - bzero((char *)sc_if->sk_rdata->sk_tx_ring, + bzero(sc_if->sk_rdata->sk_tx_ring, sizeof(struct sk_tx_desc) * SK_TX_RING_CNT); SIMPLEQ_INIT(&sc_if->sk_txmap_head); diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index d54c651486c..6152d25a3e4 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.46 2011/04/03 15:36:03 jasper Exp $ */ +/* $OpenBSD: if_ste.c,v 1.47 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -338,7 +338,7 @@ ste_miibus_readreg(struct device *self, int phy, int reg) if (sc->ste_one_phy && phy != 0) return (0); - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -353,7 +353,7 @@ ste_miibus_writereg(struct device *self, int phy, int reg, int data) struct ste_softc *sc = (struct ste_softc *)self; struct ste_mii_frame frame; - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -1077,8 +1077,7 @@ ste_init_tx_list(struct ste_softc *sc) &cd->ste_tx_chain[i + 1]; } - bzero((char *)ld->ste_tx_list, - sizeof(struct ste_desc) * STE_TX_LIST_CNT); + bzero(ld->ste_tx_list, sizeof(struct ste_desc) * STE_TX_LIST_CNT); cd->ste_tx_prod = 0; cd->ste_tx_cons = 0; diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 7b37446df9c..c12329c81d5 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.50 2010/05/19 15:27:35 oga Exp $ */ +/* $OpenBSD: if_tl.c,v 1.51 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998 @@ -741,7 +741,7 @@ int tl_miibus_readreg(dev, phy, reg) struct tl_softc *sc = (struct tl_softc *)dev; struct tl_mii_frame frame; - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -757,7 +757,7 @@ void tl_miibus_writereg(dev, phy, reg, data) struct tl_softc *sc = (struct tl_softc *)dev; struct tl_mii_frame frame; - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -1413,7 +1413,7 @@ void tl_stats_update(xsc) s = splnet(); - bzero((char *)&tl_stats, sizeof(struct tl_stats)); + bzero(&tl_stats, sizeof(struct tl_stats)); sc = xsc; ifp = &sc->arpcom.ac_if; @@ -1911,8 +1911,7 @@ void tl_stop(sc) sc->tl_cdata.tl_rx_chain[i].tl_mbuf = NULL; } } - bzero((char *)&sc->tl_ldata->tl_rx_list, - sizeof(sc->tl_ldata->tl_rx_list)); + bzero(&sc->tl_ldata->tl_rx_list, sizeof(sc->tl_ldata->tl_rx_list)); /* * Free the TX list buffers. @@ -1923,8 +1922,7 @@ void tl_stop(sc) sc->tl_cdata.tl_tx_chain[i].tl_mbuf = NULL; } } - bzero((char *)&sc->tl_ldata->tl_tx_list, - sizeof(sc->tl_ldata->tl_tx_list)); + bzero(&sc->tl_ldata->tl_tx_list, sizeof(sc->tl_ldata->tl_tx_list)); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 8d4d875f734..ae0098690b2 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.50 2011/04/05 18:01:21 henning Exp $ */ +/* $OpenBSD: if_vge.c,v 1.51 2011/06/22 16:44:27 tedu Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -771,7 +771,7 @@ vge_attach(struct device *parent, struct device *self, void *aux) */ vge_read_eeprom(sc, eaddr, VGE_EE_EADDR, 3, 1); - bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + bcopy(eaddr, &sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); printf(", address %s\n", ether_sprintf(sc->arpcom.ac_enaddr)); @@ -937,8 +937,8 @@ out: int vge_tx_list_init(struct vge_softc *sc) { - bzero ((char *)sc->vge_ldata.vge_tx_list, VGE_TX_LIST_SZ); - bzero ((char *)&sc->vge_ldata.vge_tx_mbuf, + bzero(sc->vge_ldata.vge_tx_list, VGE_TX_LIST_SZ); + bzero(&sc->vge_ldata.vge_tx_mbuf, (VGE_TX_DESC_CNT * sizeof(struct mbuf *))); bus_dmamap_sync(sc->sc_dmat, @@ -959,8 +959,8 @@ vge_rx_list_init(struct vge_softc *sc) { int i; - bzero ((char *)sc->vge_ldata.vge_rx_list, VGE_RX_LIST_SZ); - bzero ((char *)&sc->vge_ldata.vge_rx_mbuf, + bzero(sc->vge_ldata.vge_rx_list, VGE_RX_LIST_SZ); + bzero(&sc->vge_ldata.vge_rx_mbuf, (VGE_RX_DESC_CNT * sizeof(struct mbuf *))); sc->vge_rx_consumed = 0; @@ -1123,8 +1123,7 @@ vge_rxeof(struct vge_softc *sc) (total_len - ETHER_CRC_LEN); #ifdef __STRICT_ALIGNMENT - bcopy(m->m_data, m->m_data + ETHER_ALIGN, - total_len); + bcopy(m->m_data, m->m_data + ETHER_ALIGN, total_len); m->m_data += ETHER_ALIGN; #endif ifp->if_ipackets++; diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 98d1d43afdc..3360199e774 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.110 2011/04/20 01:05:28 dlg Exp $ */ +/* $OpenBSD: if_vr.c,v 1.111 2011/06/22 16:44:27 tedu Exp $ */ /* * Copyright (c) 1997, 1998 @@ -281,7 +281,7 @@ vr_miibus_readreg(struct device *dev, int phy, int reg) break; } - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -305,7 +305,7 @@ vr_miibus_writereg(struct device *dev, int phy, int reg, int data) break; } - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -1509,8 +1509,7 @@ vr_stop(struct vr_softc *sc) sc->vr_cdata.vr_rx_chain[i].vr_map = NULL; } } - bzero((char *)&sc->vr_ldata->vr_rx_list, - sizeof(sc->vr_ldata->vr_rx_list)); + bzero(&sc->vr_ldata->vr_rx_list, sizeof(sc->vr_ldata->vr_rx_list)); /* * Free the TX list buffers. @@ -1529,8 +1528,7 @@ vr_stop(struct vr_softc *sc) sc->vr_cdata.vr_tx_chain[i].vr_map = NULL; } } - bzero((char *)&sc->vr_ldata->vr_tx_list, - sizeof(sc->vr_ldata->vr_tx_list)); + bzero(&sc->vr_ldata->vr_tx_list, sizeof(sc->vr_ldata->vr_tx_list)); } #ifndef SMALL_KERNEL diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index a8607b90111..0eaa5899996 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.47 2011/04/03 15:36:03 jasper Exp $ */ +/* $OpenBSD: if_wb.c,v 1.48 2011/06/22 16:44:29 tedu Exp $ */ /* * Copyright (c) 1997, 1998 @@ -482,7 +482,7 @@ wb_miibus_readreg(dev, phy, reg) struct wb_softc *sc = (struct wb_softc *)dev; struct wb_mii_frame frame; - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -499,7 +499,7 @@ wb_miibus_writereg(dev, phy, reg, data) struct wb_softc *sc = (struct wb_softc *)dev; struct wb_mii_frame frame; - bzero((char *)&frame, sizeof(frame)); + bzero(&frame, sizeof(frame)); frame.mii_phyaddr = phy; frame.mii_regaddr = reg; @@ -1668,8 +1668,7 @@ void wb_stop(sc) /* * Free data in the RX lists. */ - bzero((char *)&sc->wb_ldata->wb_rx_list, - sizeof(sc->wb_ldata->wb_rx_list)); + bzero(&sc->wb_ldata->wb_rx_list, sizeof(sc->wb_ldata->wb_rx_list)); /* * Free the TX list buffers. @@ -1681,8 +1680,7 @@ void wb_stop(sc) } } - bzero((char *)&sc->wb_ldata->wb_tx_list, - sizeof(sc->wb_ldata->wb_tx_list)); + bzero(&sc->wb_ldata->wb_tx_list, sizeof(sc->wb_ldata->wb_tx_list)); } struct cfattach wb_ca = { diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c index 5494a9c071d..ac2f483947a 100644 --- a/sys/dev/usb/if_wi_usb.c +++ b/sys/dev/usb/if_wi_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_usb.c,v 1.51 2011/06/17 07:06:47 mk Exp $ */ +/* $OpenBSD: if_wi_usb.c,v 1.52 2011/06/22 16:44:29 tedu Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -913,8 +913,7 @@ wi_write_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) prid->frmlen = htole16(ltv->wi_len); prid->rid = htole16(ltv->wi_type); if (ltv->wi_len > 1) - bcopy((u_int8_t *)<v->wi_val, (u_int8_t *)&prid->data[0], - (ltv->wi_len-1)*2); + bcopy(<v->wi_val, &prid->data[0], (ltv->wi_len-1)*2); bzero(((char*)prid)+total_len, rnd_len - total_len); @@ -1593,7 +1592,7 @@ wi_usb_rridresp(struct wi_usb_chain *c) frmlen)); if (ltv->wi_len > 1) - bcopy(&presp->data[0], (u_int8_t *)<v->wi_val, + bcopy(&presp->data[0], <v->wi_val, (ltv->wi_len-1)*2); sc->ridresperr = 0; |