summaryrefslogtreecommitdiff
path: root/kern/bitmap_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-15 22:15:31 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-15 22:15:57 +0200
commitf7dd911ee2c78b9fc856e88afae8edc101b25844 (patch)
treebd77950260592533505299799f9f81936efeb47b /kern/bitmap_i.h
parent2f3d23605b841f9e4f4c0a13c69a9ff2db033903 (diff)
kern/bitmap: make bitmap_lookup conform to coding rules
Macros with lower case names must have a function-like interface.
Diffstat (limited to 'kern/bitmap_i.h')
-rw-r--r--kern/bitmap_i.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/kern/bitmap_i.h b/kern/bitmap_i.h
index 11c23eb..dc91a0a 100644
--- a/kern/bitmap_i.h
+++ b/kern/bitmap_i.h
@@ -29,16 +29,14 @@
* to a bit inside the word pointed by the former.
*
* Implemented as a macro for const-correctness.
- *
- * TODO Fix interface.
*/
-#define bitmap_lookup(bm, bit) \
+#define bitmap_lookup(bmp, bitp) \
MACRO_BEGIN \
int i; \
\
- i = BITMAP_LONGS((bit) + 1) - 1; \
- (bm) += i; \
- (bit) -= i * LONG_BIT; \
+ i = BITMAP_LONGS(*(bitp) + 1) - 1; \
+ *(bmp) += i; \
+ *(bitp) -= i * LONG_BIT; \
MACRO_END
static inline unsigned long