summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-02-16 17:55:10 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-02-16 17:55:10 +0000
commiteaba008230fae0e4b4cb01a1e2d0fb1684796900 (patch)
tree1c23ade0e710ecdeef968da1e225d22c36a94df6 /sys/dev
parent507c6fb894ea78ded48a13b3399e72c8f9956898 (diff)
downloadFreeBSD-src-eaba008230fae0e4b4cb01a1e2d0fb1684796900.zip
FreeBSD-src-eaba008230fae0e4b4cb01a1e2d0fb1684796900.tar.gz
Convert a few more long -> rman_res_t.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/chipsets/ata-promise.c2
-rw-r--r--sys/dev/pci/pci_pci.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ata/chipsets/ata-promise.c b/sys/dev/ata/chipsets/ata-promise.c
index 70adec3..0cc1435 100644
--- a/sys/dev/ata/chipsets/ata-promise.c
+++ b/sys/dev/ata/chipsets/ata-promise.c
@@ -191,7 +191,7 @@ ata_promise_probe(device_t dev)
!BUS_READ_IVAR(device_get_parent(GRANDPARENT(dev)),
GRANDPARENT(dev), PCI_IVAR_DEVID, &devid) &&
((devid == ATA_DEC_21150) || (devid == ATA_DEC_21150_1))) {
- static long start = 0, end = 0;
+ static rman_res_t start = 0, end = 0;
if (pci_get_slot(dev) == 1) {
bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &end);
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index a6c6931..6f9a22c 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -388,7 +388,7 @@ pcib_alloc_window(struct pcib_softc *sc, struct pcib_window *w, int type,
char buf[64];
int error, rid;
- if (max_address != (u_long)max_address)
+ if (max_address != (rman_res_t)max_address)
max_address = ~0ul;
w->rman.rm_start = 0;
w->rman.rm_end = max_address;
@@ -1247,14 +1247,14 @@ pcib_alloc_new_window(struct pcib_softc *sc, struct pcib_window *w, int type,
return (ENOSPC);
}
- wmask = (1ul << w->step) - 1;
+ wmask = ((rman_res_t)1 << w->step) - 1;
if (RF_ALIGNMENT(flags) < w->step) {
flags &= ~RF_ALIGNMENT_MASK;
flags |= RF_ALIGNMENT_LOG2(w->step);
}
start &= ~wmask;
end |= wmask;
- count = roundup2(count, 1ul << w->step);
+ count = roundup2(count, (rman_res_t)1 << w->step);
rid = w->reg;
res = bus_alloc_resource(sc->dev, type, &rid, start, end, count,
flags & ~RF_ACTIVE);
@@ -1389,7 +1389,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
end = w->rman.rm_end;
if (start + count - 1 > end || start + count < start)
return (EINVAL);
- wmask = (1ul << w->step) - 1;
+ wmask = ((rman_res_t)1 << w->step) - 1;
/*
* If there is no resource at all, just try to allocate enough
@@ -1435,7 +1435,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
device_printf(sc->dev,
"attempting to grow %s window for (%#lx-%#lx,%#lx)\n",
w->name, start, end, count);
- align = 1ul << RF_ALIGNMENT(flags);
+ align = (rman_res_t)1 << RF_ALIGNMENT(flags);
if (start < w->base) {
if (rman_first_free_region(&w->rman, &start_free, &end_free) !=
0 || start_free != w->base)
OpenPOWER on IntegriCloud