diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2012-10-04 20:13:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:04:56 -0400 |
commit | 125c4c706b680c7831f0966ff873c1ad0354ec25 (patch) | |
tree | 2b45c5fdd3f69173774fc9ae92c3568cb9796d37 /include/linux/idr.h | |
parent | b74ca3b3fd0fac08167ff96287cece56e8ca6f4d (diff) |
idr: rename MAX_LEVEL to MAX_IDR_LEVEL
To avoid name conflicts:
drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
While at it, also make the other names more consistent and add
parentheses.
[akpm@linux-foundation.org: repair fallout]
[sfr@canb.auug.org.au: IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change]
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: walter harms <wharms@bfs.de>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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" */ |