Commit 4106ecaf authored by Tejun Heo's avatar Tejun Heo Committed by Linus Torvalds

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: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fe6e24ec
...@@ -49,28 +49,24 @@ ...@@ -49,28 +49,24 @@
#define MAX_IDR_FREE (MAX_IDR_LEVEL * 2) #define MAX_IDR_FREE (MAX_IDR_LEVEL * 2)
struct idr_layer { struct idr_layer {
unsigned long bitmap; /* A zero bit means "space here" */ unsigned long bitmap; /* A zero bit means "space here" */
struct idr_layer __rcu *ary[1<<IDR_BITS]; struct idr_layer __rcu *ary[1<<IDR_BITS];
int count; /* When zero, we can release it */ int count; /* When zero, we can release it */
int layer; /* distance from leaf */ int layer; /* distance from leaf */
struct rcu_head rcu_head; struct rcu_head rcu_head;
}; };
struct idr { struct idr {
struct idr_layer __rcu *top; struct idr_layer __rcu *top;
struct idr_layer *id_free; struct idr_layer *id_free;
int layers; /* only valid without concurrent changes */ int layers; /* only valid w/o concurrent changes */
int id_free_cnt; int id_free_cnt;
spinlock_t lock; spinlock_t lock;
}; };
#define IDR_INIT(name) \ #define IDR_INIT(name) \
{ \ { \
.top = NULL, \ .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
.id_free = NULL, \
.layers = 0, \
.id_free_cnt = 0, \
.lock = __SPIN_LOCK_UNLOCKED(name.lock), \
} }
#define DEFINE_IDR(name) struct idr name = IDR_INIT(name) #define DEFINE_IDR(name) struct idr name = IDR_INIT(name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment