Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Remove unused variables
details: https://anonhg.NetBSD.org/src/rev/1dfa5cdbb799
branches: trunk
changeset: 789945:1dfa5cdbb799
user: martin <martin%NetBSD.org@localhost>
date: Fri Sep 13 21:22:10 2013 +0000
description:
Remove unused variables
diffstat:
sys/dev/pci/if_wm.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (65 lines):
diff -r 31c4e8e31049 -r 1dfa5cdbb799 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Fri Sep 13 21:14:58 2013 +0000
+++ b/sys/dev/pci/if_wm.c Fri Sep 13 21:22:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.263 2013/09/08 03:17:02 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.264 2013/09/13 21:22:10 martin Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.263 2013/09/08 03:17:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.264 2013/09/13 21:22:10 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -5355,9 +5355,11 @@
static int
wm_validate_eeprom_checksum(struct wm_softc *sc)
{
- uint16_t checksum, valid_checksum;
+ uint16_t checksum;
uint16_t eeprom_data;
- uint16_t csum_wordaddr;
+#ifdef WM_DEBUG
+ uint16_t csum_wordaddr, valid_checksum;
+#endif
int i;
checksum = 0;
@@ -5366,6 +5368,7 @@
if (sc->sc_type == WM_T_I211)
return 0;
+#ifdef WM_DEBUG
if (sc->sc_type == WM_T_PCH_LPT) {
csum_wordaddr = NVM_COMPAT;
valid_checksum = NVM_COMPAT_VALID_CHECKSUM;
@@ -5374,7 +5377,6 @@
valid_checksum = NVM_FUTURE_INIT_WORD1_VALID_CHECKSUM;
}
-#ifdef WM_DEBUG
/* Dump EEPROM image for debug */
if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
|| (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
@@ -6073,12 +6075,13 @@
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
- uint32_t rxcw, ctrl, status;
+ uint32_t status;
status = CSR_READ(sc, WMREG_STATUS);
- rxcw = CSR_READ(sc, WMREG_RXCW);
- ctrl = CSR_READ(sc, WMREG_CTRL);
+ /* XXX is this needed? */
+ (void)CSR_READ(sc, WMREG_RXCW);
+ (void)CSR_READ(sc, WMREG_CTRL);
/* set link status */
if ((status & STATUS_LU) == 0) {
Home |
Main Index |
Thread Index |
Old Index