diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2008-09-24 19:13:00 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2008-09-24 19:13:00 +0000 |
commit | 6ef1d9d300bca02697f8fb2da259c12090976d7d (patch) | |
tree | 1c7d9b21780ac19c3548caad1b42e686a4c4ad1e /sys/dev | |
parent | 74ae10b2c01de363b3ca9851f92fc13c96a83abc (diff) |
remove dead stores and newly created unused variables.
Found by LLVM/Clang Static Analyzer.
ok henning@ brad@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_em.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_em_hw.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/if_ixgb.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/if_ti.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_xge.c | 4 |
5 files changed, 7 insertions, 17 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index a4ebc80d7bb..f52e92bec1f 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.187 2008/08/29 23:28:34 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.188 2008/09/24 19:12:59 chl Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -2420,11 +2420,9 @@ em_initialize_receive_unit(struct em_softc *sc) { u_int32_t reg_rctl; u_int32_t reg_rxcsum; - struct ifnet *ifp; u_int64_t bus_addr; INIT_DEBUGOUT("em_initialize_receive_unit: begin"); - ifp = &sc->interface_data.ac_if; /* Make sure receives are disabled while setting up the descriptor ring */ E1000_WRITE_REG(&sc->hw, RCTL, 0); diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c index 8ee16f6b9f6..9285f58f6f5 100644 --- a/sys/dev/pci/if_em_hw.c +++ b/sys/dev/pci/if_em_hw.c @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: if_em_hw.c,v 1.29 2008/03/21 00:20:55 brad Exp $ */ +/* $OpenBSD: if_em_hw.c,v 1.30 2008/09/24 19:12:59 chl Exp $ */ /* if_em_hw.c * Shared functions for accessing and configuring the MAC @@ -243,7 +243,6 @@ em_set_phy_type(struct em_hw *hw) static void em_phy_init_script(struct em_hw *hw) { - uint32_t ret_val; uint16_t phy_saved_data; DEBUGFUNC("em_phy_init_script"); @@ -253,7 +252,7 @@ em_phy_init_script(struct em_hw *hw) /* Save off the current value of register 0x2F5B to be restored at * the end of this routine. */ - ret_val = em_read_phy_reg(hw, 0x2F5B, &phy_saved_data); + em_read_phy_reg(hw, 0x2F5B, &phy_saved_data); /* Disabled the PHY transmitter */ em_write_phy_reg(hw, 0x2F5B, 0x0003); diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 648ac634aa4..14ec3f9757f 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.45 2008/09/10 14:01:22 blambert Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.46 2008/09/24 19:12:59 chl Exp $ */ #include <dev/pci/if_ixgb.h> @@ -1475,11 +1475,8 @@ ixgb_get_buf(struct ixgb_softc *sc, int i, { struct mbuf *mp = nmp; struct ixgb_buffer *rx_buffer; - struct ifnet *ifp; int error; - ifp = &sc->interface_data.ac_if; - if (mp == NULL) { MGETHDR(mp, M_DONTWAIT, MT_DATA); if (mp == NULL) { @@ -1605,11 +1602,8 @@ ixgb_initialize_receive_unit(struct ixgb_softc *sc) u_int32_t reg_rctl; u_int32_t reg_rxcsum; u_int32_t reg_rxdctl; - struct ifnet *ifp; u_int64_t bus_addr; - ifp = &sc->interface_data.ac_if; - /* * Make sure receives are disabled while setting up the descriptor * ring diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index c1abaa89262..d78a80f617a 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ti.c,v 1.86 2008/09/18 15:16:30 naddy Exp $ */ +/* $OpenBSD: if_ti.c,v 1.87 2008/09/24 19:12:59 chl Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1851,7 +1851,6 @@ ti_rxeof(struct ti_softc *sc) if ((cur_rx->ti_ip_cksum ^ 0xffff) == 0) sumflags |= M_IPV4_CSUM_IN_OK; m->m_pkthdr.csum_flags = sumflags; - sumflags = 0; ether_input_mbuf(ifp, m); } diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 0ed947c61e0..8636c04ea33 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.43 2007/09/19 03:50:25 brad Exp $ */ +/* $OpenBSD: if_xge.c,v 1.44 2008/09/24 19:12:59 chl Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -1221,7 +1221,7 @@ xge_alloc_txmem(struct xge_softc *sc) /* setup transmit array pointers */ txp = (struct txd *)kva; txdp = seg.ds_addr; - for (txp = (struct txd *)kva, i = 0; i < NTXDESCS; i++) { + for (i = 0; i < NTXDESCS; i++) { sc->sc_txd[i] = txp; sc->sc_txdp[i] = txdp; txp += NTXFRAGS; |