diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-09-11 05:39:52 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-09-11 05:39:52 +0000 |
commit | 28339e93ccfee02e8afc8a7660d39c83e746faaa (patch) | |
tree | fda12bcced07ca529a76cc5e90ad261015b1fcdf | |
parent | 1d174e936ef41c57764b558b5421557fdd073ec4 (diff) |
Remove the redundant local variable 'revision' from the PCI attach function.
The softc field dc_revision contains the PCI revision. No functional change.
-rw-r--r-- | sys/dev/pci/if_dc_pci.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index e5369a994b5..8759a6c3136 100644 --- a/sys/dev/pci/if_dc_pci.c +++ b/sys/dev/pci/if_dc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_pci.c,v 1.59 2007/11/26 17:45:14 brad Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.60 2008/09/11 05:39:51 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -210,7 +210,6 @@ void dc_pci_attach(parent, self, aux) pci_chipset_tag_t pc = pa->pa_pc; pci_intr_handle_t ih; bus_size_t size; - u_int32_t revision; int found = 0; sc->sc_dmat = pa->pa_dmat; @@ -259,7 +258,7 @@ void dc_pci_attach(parent, self, aux) printf(": %s", intrstr); /* Need this info to decide on a chip type. */ - sc->dc_revision = revision = PCI_REVISION(pa->pa_class); + sc->dc_revision = PCI_REVISION(pa->pa_class); /* Get the eeprom width, but PNIC has no eeprom */ if (!(PCI_VENDOR(pa->pa_id) == PCI_VENDOR_LITEON && @@ -342,10 +341,9 @@ void dc_pci_attach(parent, self, aux) } if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_MACRONIX_MX98713) { found = 1; - if (revision < DC_REVISION_98713A) { + if (sc->dc_revision < DC_REVISION_98713A) sc->dc_type = DC_TYPE_98713; - } - if (revision >= DC_REVISION_98713A) { + if (sc->dc_revision >= DC_REVISION_98713A) { sc->dc_type = DC_TYPE_98713A; sc->dc_flags |= DC_21143_NWAY; } @@ -355,8 +353,8 @@ void dc_pci_attach(parent, self, aux) if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_MACRONIX_MX98715 || PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ACCTON_EN1217) { found = 1; - if (revision >= DC_REVISION_98715AEC_C && - revision < DC_REVISION_98725) + if (sc->dc_revision >= DC_REVISION_98715AEC_C && + sc->dc_revision < DC_REVISION_98725) sc->dc_flags |= DC_128BIT_HASH; sc->dc_type = DC_TYPE_987x5; sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR; @@ -372,11 +370,11 @@ void dc_pci_attach(parent, self, aux) case PCI_VENDOR_COMPEX: if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPEX_98713) { found = 1; - if (revision < DC_REVISION_98713A) { + if (sc->dc_revision < DC_REVISION_98713A) { sc->dc_type = DC_TYPE_98713; sc->dc_flags |= DC_REDUCED_MII_POLL; } - if (revision >= DC_REVISION_98713A) + if (sc->dc_revision >= DC_REVISION_98713A) sc->dc_type = DC_TYPE_98713A; sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR; } @@ -398,7 +396,7 @@ void dc_pci_attach(parent, self, aux) M_NOWAIT); if (sc->dc_pnic_rx_buf == NULL) panic("dc_pci_attach"); - if (revision < DC_REVISION_82C169) + if (sc->dc_revision < DC_REVISION_82C169) sc->dc_pmode = DC_PMODE_SYM; } break; |