diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-02-20 01:32:58 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-02-20 01:32:58 +0000 |
commit | f8385663eeba2c10cd82a51c0a461a4f932458a3 (patch) | |
tree | 1d99680c416ab999716f7e3fb78956be8804e81f /sys/sys/rman.h | |
parent | 7a33cbc5f75355b9aacc299db55706229c9da4af (diff) | |
download | FreeBSD-src-f8385663eeba2c10cd82a51c0a461a4f932458a3.zip FreeBSD-src-f8385663eeba2c10cd82a51c0a461a4f932458a3.tar.gz |
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
This simplifies checking for default resource range for bus_alloc_resource(),
and improves readability.
This is part of, and related to, the migration of rman_res_t from u_long to
uintmax_t.
Discussed with: jhb
Suggested by: marcel
Diffstat (limited to 'sys/sys/rman.h')
-rw-r--r-- | sys/sys/rman.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 9ea7bba..76db630 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -63,6 +63,8 @@ enum rman_type { RMAN_UNINIT = 0, RMAN_GAUGE, RMAN_ARRAY }; #define RM_MAX_END ((rman_res_t)~0) +#define RMAN_IS_DEFAULT_RANGE(s,e) ((s) == 0 && (e) == RM_MAX_END) + /* * Userspace-exported structures. */ |