summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-03-03 05:07:35 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-03-03 05:07:35 +0000
commit70aaabfeaca395af01baa82155ef9870825d9364 (patch)
tree6694899d37c3d4102983706c5d1f442c638cbcb1 /sys/isa
parentd74d168b0f125a4b155175b6593dc09109d035d5 (diff)
downloadFreeBSD-src-70aaabfeaca395af01baa82155ef9870825d9364.zip
FreeBSD-src-70aaabfeaca395af01baa82155ef9870825d9364.tar.gz
Replace all resource occurrences of '0UL/~0UL' with '0/~0'.
Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is 0xFFF.... (all bits of the full type set). By dropping the 'ul' suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit platforms gets it to a type-independent 'unsigned max'. Reviewed By: cem Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5255
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/isa_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index bb03ea0..d2c8113 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -483,7 +483,7 @@ isa_claim_resources(device_t dev, device_t child)
if (!rle->res) {
rid = rle->rid;
resource_list_alloc(rl, dev, child, rle->type, &rid,
- 0ul, ~0ul, 1, 0);
+ 0, ~0, 1, 0);
}
}
}
OpenPOWER on IntegriCloud