diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2016-03-03 05:07:35 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2016-03-03 05:07:35 +0000 |
commit | 534ccd7bbfadde557eeffe986e5462455c8111ea (patch) | |
tree | 6694899d37c3d4102983706c5d1f442c638cbcb1 /sys/kern/subr_bus.c | |
parent | 342af4d5efec74bb4bc11261fdd9991c53616f54 (diff) | |
download | src-534ccd7bbfadde557eeffe986e5462455c8111ea.tar.gz src-534ccd7bbfadde557eeffe986e5462455c8111ea.zip |
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
Notes
Notes:
svn path=/head/; revision=296336
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index a144031867aa..8daa9f2bc6d8 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3236,9 +3236,9 @@ resource_list_delete(struct resource_list *rl, int type, int rid) * @param type the type of resource to allocate * @param rid a pointer to the resource identifier * @param start hint at the start of the resource range - pass - * @c 0UL for any start address + * @c 0 for any start address * @param end hint at the end of the resource range - pass - * @c ~0UL for any end address + * @c ~0 for any end address * @param count hint at the size of range required - pass @c 1 * for any size * @param flags any extra flags to control the resource @@ -3293,9 +3293,9 @@ resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, * @param type the type of resource to allocate * @param rid a pointer to the resource identifier * @param start hint at the start of the resource range - pass - * @c 0UL for any start address + * @c 0 for any start address * @param end hint at the end of the resource range - pass - * @c ~0UL for any end address + * @c ~0 for any end address * @param count hint at the size of range required - pass @c 1 * for any size * @param flags any extra flags to control the resource |