Skip to content

Commit

Permalink
lglock: remove unused DEFINE_LGLOCK_LOCKDEP()
Browse files Browse the repository at this point in the history
struct lglocks use their own lock_key/lock_dep_map which are defined in
struct lglock.  DEFINE_LGLOCK_LOCKDEP() is unused, so remove it and save a
small piece of memory.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Lai Jiangshan authored and Al Viro committed Oct 10, 2012
1 parent 614c321 commit 462e1e1
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions include/linux/lglock.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,8 @@

#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define LOCKDEP_INIT_MAP lockdep_init_map

#define DEFINE_LGLOCK_LOCKDEP(name) \
struct lock_class_key name##_lock_key; \
struct lockdep_map name##_lock_dep_map; \
EXPORT_SYMBOL(name##_lock_dep_map)

#else
#define LOCKDEP_INIT_MAP(a, b, c, d)

#define DEFINE_LGLOCK_LOCKDEP(name)
#endif

struct lglock {
Expand All @@ -57,7 +49,6 @@ struct lglock {
};

#define DEFINE_LGLOCK(name) \
DEFINE_LGLOCK_LOCKDEP(name); \
DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
= __ARCH_SPIN_LOCK_UNLOCKED; \
struct lglock name = { .lock = &name ## _lock }
Expand Down

0 comments on commit 462e1e1

Please sign in to comment.