diff options
author | phk <phk@FreeBSD.org> | 2003-05-31 19:46:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-31 19:46:58 +0000 |
commit | ed097ecfc23f83e296caeddd50a64ae21fc7f8d4 (patch) | |
tree | f86bba71d32ac601802573c5ef34bb31e5c93473 /sys | |
parent | d5ebc72a62ad524d6a88d5854b25dd232d7cd5a3 (diff) | |
download | FreeBSD-src-ed097ecfc23f83e296caeddd50a64ae21fc7f8d4.zip FreeBSD-src-ed097ecfc23f83e296caeddd50a64ae21fc7f8d4.tar.gz |
Move some FALLTHROUGH comments so they work.
Fix indentation error.
Make boardid string long enough.
Remove unused variable.
Found by: FlexeLint
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/de/if_de.c | 11 | ||||
-rw-r--r-- | sys/dev/de/if_devar.h | 2 | ||||
-rw-r--r-- | sys/pci/if_de.c | 11 | ||||
-rw-r--r-- | sys/pci/if_devar.h | 2 |
4 files changed, 12 insertions, 14 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index e6d5892..de984d8 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -467,8 +467,9 @@ tulip_media_link_monitor( #if defined(DIAGNOSTIC) || defined(TULIP_DEBUG) panic("tulip_media_link_monitor: %s: botch at line %d\n", tulip_mediums[sc->tulip_media],__LINE__); -#endif +#else return TULIP_LINK_UNKNOWN; +#endif } @@ -1336,8 +1337,8 @@ tulip_mii_autonegotiate( sc->tulip_probe_timeout = 3000; sc->tulip_intrmask |= TULIP_STS_ABNRMLINTR|TULIP_STS_NORMALINTR; sc->tulip_probe_state = TULIP_PROBE_PHYRESET; - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case TULIP_PROBE_PHYRESET: { u_int32_t status; u_int32_t data = tulip_mii_readreg(sc, phyaddr, PHYREG_CONTROL); @@ -1378,8 +1379,8 @@ tulip_mii_autonegotiate( #endif sc->tulip_probe_state = TULIP_PROBE_PHYAUTONEG; sc->tulip_probe_timeout = 3000; - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case TULIP_PROBE_PHYAUTONEG: { u_int32_t status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS); u_int32_t data; @@ -3350,7 +3351,6 @@ tulip_rx_intr( for (;;) { TULIP_PERFSTART(rxget) - struct ether_header eh; tulip_desc_t *eop = ri->ri_nextin; int total_len = 0, last_offset = 0; struct mbuf *ms = NULL, *me = NULL; @@ -3464,7 +3464,6 @@ tulip_rx_intr( #endif #endif /* TULIP_BUS_DMA */ - eh = *mtod(ms, struct ether_header *); #ifndef __FreeBSD__ if (sc->tulip_if.if_bpf != NULL) { if (me == ms) @@ -3862,7 +3861,7 @@ tulip_intr_handler( * Pass 2.[012] of the 21140A-A[CDE] may hang and/or corrupt data * on receive overflows. */ - if ((misses & 0x0FFE0000) && (sc->tulip_features & TULIP_HAVE_RXBADOVRFLW)) { + if ((misses & 0x0FFE0000) && (sc->tulip_features & TULIP_HAVE_RXBADOVRFLW)) { sc->tulip_dot3stats.dot3StatsInternalMacReceiveErrors++; /* * Stop the receiver process and spin until it's stopped. diff --git a/sys/dev/de/if_devar.h b/sys/dev/de/if_devar.h index f9e63b3..39ee922 100644 --- a/sys/dev/de/if_devar.h +++ b/sys/dev/de/if_devar.h @@ -609,7 +609,7 @@ struct _tulip_softc_t { */ u_int32_t tulip_setupbuf[192/sizeof(u_int32_t)]; u_int32_t tulip_setupdata[192/sizeof(u_int32_t)]; - char tulip_boardid[16]; /* buffer for board ID */ + char tulip_boardid[17]; /* buffer for board ID */ u_int8_t tulip_rombuf[128]; u_int8_t tulip_pci_busno; /* needed for multiport boards */ u_int8_t tulip_pci_devno; /* needed for multiport boards */ diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index e6d5892..de984d8 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -467,8 +467,9 @@ tulip_media_link_monitor( #if defined(DIAGNOSTIC) || defined(TULIP_DEBUG) panic("tulip_media_link_monitor: %s: botch at line %d\n", tulip_mediums[sc->tulip_media],__LINE__); -#endif +#else return TULIP_LINK_UNKNOWN; +#endif } @@ -1336,8 +1337,8 @@ tulip_mii_autonegotiate( sc->tulip_probe_timeout = 3000; sc->tulip_intrmask |= TULIP_STS_ABNRMLINTR|TULIP_STS_NORMALINTR; sc->tulip_probe_state = TULIP_PROBE_PHYRESET; - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case TULIP_PROBE_PHYRESET: { u_int32_t status; u_int32_t data = tulip_mii_readreg(sc, phyaddr, PHYREG_CONTROL); @@ -1378,8 +1379,8 @@ tulip_mii_autonegotiate( #endif sc->tulip_probe_state = TULIP_PROBE_PHYAUTONEG; sc->tulip_probe_timeout = 3000; - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case TULIP_PROBE_PHYAUTONEG: { u_int32_t status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS); u_int32_t data; @@ -3350,7 +3351,6 @@ tulip_rx_intr( for (;;) { TULIP_PERFSTART(rxget) - struct ether_header eh; tulip_desc_t *eop = ri->ri_nextin; int total_len = 0, last_offset = 0; struct mbuf *ms = NULL, *me = NULL; @@ -3464,7 +3464,6 @@ tulip_rx_intr( #endif #endif /* TULIP_BUS_DMA */ - eh = *mtod(ms, struct ether_header *); #ifndef __FreeBSD__ if (sc->tulip_if.if_bpf != NULL) { if (me == ms) @@ -3862,7 +3861,7 @@ tulip_intr_handler( * Pass 2.[012] of the 21140A-A[CDE] may hang and/or corrupt data * on receive overflows. */ - if ((misses & 0x0FFE0000) && (sc->tulip_features & TULIP_HAVE_RXBADOVRFLW)) { + if ((misses & 0x0FFE0000) && (sc->tulip_features & TULIP_HAVE_RXBADOVRFLW)) { sc->tulip_dot3stats.dot3StatsInternalMacReceiveErrors++; /* * Stop the receiver process and spin until it's stopped. diff --git a/sys/pci/if_devar.h b/sys/pci/if_devar.h index f9e63b3..39ee922 100644 --- a/sys/pci/if_devar.h +++ b/sys/pci/if_devar.h @@ -609,7 +609,7 @@ struct _tulip_softc_t { */ u_int32_t tulip_setupbuf[192/sizeof(u_int32_t)]; u_int32_t tulip_setupdata[192/sizeof(u_int32_t)]; - char tulip_boardid[16]; /* buffer for board ID */ + char tulip_boardid[17]; /* buffer for board ID */ u_int8_t tulip_rombuf[128]; u_int8_t tulip_pci_busno; /* needed for multiport boards */ u_int8_t tulip_pci_devno; /* needed for multiport boards */ |