summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2009-12-29 14:06:36 +0000
committermarius <marius@FreeBSD.org>2009-12-29 14:06:36 +0000
commit26975ab6ef921dba95522c38ba45b731803f4357 (patch)
tree690b550b5e8233f714f81f6849f575f9046d1d46 /sys/sparc64
parentef60c17afcd8120e5cb3f480a3b2750f4d6e20bd (diff)
downloadFreeBSD-src-26975ab6ef921dba95522c38ba45b731803f4357.zip
FreeBSD-src-26975ab6ef921dba95522c38ba45b731803f4357.tar.gz
- Remove a redundant variable and an unnecessary cast.
- Fix whitespace.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/fire.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/sparc64/pci/fire.c b/sys/sparc64/pci/fire.c
index 39fac20..9d78a60 100644
--- a/sys/sparc64/pci/fire.c
+++ b/sys/sparc64/pci/fire.c
@@ -290,7 +290,7 @@ fire_attach(device_t dev)
uint64_t ino_bitmap, val;
phandle_t node;
uint32_t prop, prop_array[2];
- int i, j, mode, nrange;
+ int i, j, mode;
u_int lw;
uint16_t mps;
@@ -725,13 +725,12 @@ fire_attach(device_t dev)
rman_manage_region(&sc->sc_pci_mem_rman, 0, FO_MEM_SIZE) != 0)
panic("%s: failed to set up memory rman", __func__);
- nrange = OF_getprop_alloc(node, "ranges", sizeof(*range),
- (void **)&range);
+ i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range);
/*
* Make sure that the expected ranges are present. The
* OFW_PCI_CS_MEM64 one is not currently used though.
*/
- if (nrange != FIRE_NRANGE)
+ if (i != FIRE_NRANGE)
panic("%s: unsupported number of ranges", __func__);
/*
* Find the addresses of the various bus spaces.
@@ -743,7 +742,7 @@ fire_attach(device_t dev)
j = OFW_PCI_RANGE_CS(&range[i]);
if (sc->sc_pci_bh[j] != 0)
panic("%s: duplicate range for space %d",
- __func__, j);
+ __func__, j);
sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]);
}
free(range, M_OFWPROP);
@@ -2101,7 +2100,7 @@ fire_alloc_bus_tag(struct fire_softc *sc, int type)
{
bus_space_tag_t bt;
- bt = (bus_space_tag_t)malloc(sizeof(struct bus_space_tag), M_DEVBUF,
+ bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF,
M_NOWAIT | M_ZERO);
if (bt == NULL)
panic("%s: out of memory", __func__);
OpenPOWER on IntegriCloud