summaryrefslogtreecommitdiffstats
path: root/sys/x86/xen
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/x86/xen
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/x86/xen')
-rw-r--r--sys/x86/xen/xenpv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/xen/xenpv.c b/sys/x86/xen/xenpv.c
index 50fd9df..30e8dbc 100644
--- a/sys/x86/xen/xenpv.c
+++ b/sys/x86/xen/xenpv.c
@@ -120,7 +120,7 @@ xenpv_alloc_physmem(device_t dev, device_t child, int *res_id, size_t size)
int error;
res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, LOW_MEM_LIMIT,
- ~0ul, size, RF_ACTIVE);
+ ~0, size, RF_ACTIVE);
if (res == NULL)
return (NULL);
OpenPOWER on IntegriCloud