提交 4106ecaf 编写于 作者: T Tejun Heo 提交者: 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: NTejun Heo <tj@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fe6e24ec
...@@ -59,17 +59,13 @@ struct idr_layer { ...@@ -59,17 +59,13 @@ struct idr_layer {
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, \
.id_free = NULL, \
.layers = 0, \
.id_free_cnt = 0, \
.lock = __SPIN_LOCK_UNLOCKED(name.lock), \ .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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册