]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
idr: cosmetic updates to struct / initializer definitions
authorTejun Heo <tj@kernel.org>
Thu, 7 Feb 2013 01:31:32 +0000 (12:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:47:27 +0000 (16:47 +1100)
* 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>
include/linux/idr.h

index 4cf042da3892aa23a7cb699d3622d4332759ef18..8f4980db352421e1ed6b27ece7965e789b335718 100644 (file)
 #define MAX_IDR_FREE (MAX_IDR_LEVEL * 2)
 
 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];
-       int                      count;  /* When zero, we can release it */
-       int                      layer;  /* distance from leaf */
-       struct rcu_head          rcu_head;
+       int                     count;  /* When zero, we can release it */
+       int                     layer;  /* distance from leaf */
+       struct rcu_head         rcu_head;
 };
 
 struct idr {
-       struct idr_layer __rcu *top;
-       struct idr_layer *id_free;
-       int               layers; /* only valid without concurrent changes */
-       int               id_free_cnt;
-       spinlock_t        lock;
+       struct idr_layer __rcu  *top;
+       struct idr_layer        *id_free;
+       int                     layers; /* only valid w/o concurrent changes */
+       int                     id_free_cnt;
+       spinlock_t              lock;
 };
 
-#define IDR_INIT(name)                                         \
-{                                                              \
-       .top            = NULL,                                 \
-       .id_free        = NULL,                                 \
-       .layers         = 0,                                    \
-       .id_free_cnt    = 0,                                    \
-       .lock           = __SPIN_LOCK_UNLOCKED(name.lock),      \
+#define IDR_INIT(name)                                                 \
+{                                                                      \
+       .lock                   = __SPIN_LOCK_UNLOCKED(name.lock),      \
 }
 #define DEFINE_IDR(name)       struct idr name = IDR_INIT(name)