diff options
Diffstat (limited to 'include/linux/idr.h')
-rw-r--r-- | include/linux/idr.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index 255491cf522e..87259a44c251 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -38,15 +38,15 @@ | |||
38 | #define IDR_SIZE (1 << IDR_BITS) | 38 | #define IDR_SIZE (1 << IDR_BITS) |
39 | #define IDR_MASK ((1 << IDR_BITS)-1) | 39 | #define IDR_MASK ((1 << IDR_BITS)-1) |
40 | 40 | ||
41 | #define MAX_ID_SHIFT (sizeof(int)*8 - 1) | 41 | #define MAX_IDR_SHIFT (sizeof(int)*8 - 1) |
42 | #define MAX_ID_BIT (1U << MAX_ID_SHIFT) | 42 | #define MAX_IDR_BIT (1U << MAX_IDR_SHIFT) |
43 | #define MAX_ID_MASK (MAX_ID_BIT - 1) | 43 | #define MAX_IDR_MASK (MAX_IDR_BIT - 1) |
44 | 44 | ||
45 | /* Leave the possibility of an incomplete final layer */ | 45 | /* Leave the possibility of an incomplete final layer */ |
46 | #define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS | 46 | #define MAX_IDR_LEVEL ((MAX_IDR_SHIFT + IDR_BITS - 1) / IDR_BITS) |
47 | 47 | ||
48 | /* Number of id_layer structs to leave in free list */ | 48 | /* Number of id_layer structs to leave in free list */ |
49 | #define IDR_FREE_MAX MAX_LEVEL + MAX_LEVEL | 49 | #define MAX_IDR_FREE (MAX_IDR_LEVEL * 2) |
50 | 50 | ||
51 | struct idr_layer { | 51 | struct idr_layer { |
52 | unsigned long bitmap; /* A zero bit means "space here" */ | 52 | unsigned long bitmap; /* A zero bit means "space here" */ |