diff options
author | Tejun Heo <tj@kernel.org> | 2013-02-27 20:03:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 22:10:14 -0500 |
commit | 4106ecaf59b79efff3f9b466baf9e8c67e19ac5a (patch) | |
tree | 2a54800abd642a9be321a7ed51bc18004f4b73c4 /include/linux/idr.h | |
parent | fe6e24ec90b753392c3f9ec1fbca196c4e88e511 (diff) |
idr: cosmetic updates to struct / initializer definitions
* Tab align fields like a normal person.
* Drop the unnecessary 0 inits from IDR_INIT().
This patch is purely cosmetic.
Signed-off-by: Tejun Heo <tj@kernel.org>
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 | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index 4cf042da3892..8f4980db3524 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -49,28 +49,24 @@ | |||
49 | #define MAX_IDR_FREE (MAX_IDR_LEVEL * 2) | 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" */ |
53 | struct idr_layer __rcu *ary[1<<IDR_BITS]; | 53 | struct idr_layer __rcu *ary[1<<IDR_BITS]; |
54 | int count; /* When zero, we can release it */ | 54 | int count; /* When zero, we can release it */ |
55 | int layer; /* distance from leaf */ | 55 | int layer; /* distance from leaf */ |
56 | struct rcu_head rcu_head; | 56 | struct rcu_head rcu_head; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | struct idr { | 59 | struct idr { |
60 | struct idr_layer __rcu *top; | 60 | struct idr_layer __rcu *top; |
61 | struct idr_layer *id_free; | 61 | struct idr_layer *id_free; |
62 | int layers; /* only valid without concurrent changes */ | 62 | int layers; /* only valid w/o concurrent changes */ |
63 | int id_free_cnt; | 63 | int id_free_cnt; |
64 | spinlock_t lock; | 64 | spinlock_t lock; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #define IDR_INIT(name) \ | 67 | #define IDR_INIT(name) \ |
68 | { \ | 68 | { \ |
69 | .top = NULL, \ | 69 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ |
70 | .id_free = NULL, \ | ||
71 | .layers = 0, \ | ||
72 | .id_free_cnt = 0, \ | ||
73 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ||
74 | } | 70 | } |
75 | #define DEFINE_IDR(name) struct idr name = IDR_INIT(name) | 71 | #define DEFINE_IDR(name) struct idr name = IDR_INIT(name) |
76 | 72 | ||