Commit e25cf3db authored by Ingo Molnar's avatar Ingo Molnar

lockdep: include/linux/lockdep.h - fix warning in net/bluetooth/af_bluetooth.c

fix this warning:

  net/bluetooth/af_bluetooth.c:60: warning: ‘bt_key_strings’ defined but not used
  net/bluetooth/af_bluetooth.c:71: warning: ‘bt_slock_key_strings’ defined but not used

this is a lockdep macro problem in the !LOCKDEP case.

We cannot convert it to an inline because the macro works on multiple types,
but we can mark the parameter used.

[ also clean up a misaligned tab in sock_lock_init_class_and_name() ]

[ also remove #ifdefs from around af_family_clock_key strings - which
  were certainly added to get rid of the ugly build warnings. ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 708b8eae
...@@ -336,10 +336,11 @@ static inline void lockdep_on(void) ...@@ -336,10 +336,11 @@ static inline void lockdep_on(void)
# define lock_set_subclass(l, s, i) do { } while (0) # define lock_set_subclass(l, s, i) do { } while (0)
# define lockdep_init() do { } while (0) # define lockdep_init() do { } while (0)
# define lockdep_info() do { } while (0) # define lockdep_info() do { } while (0)
# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) # define lockdep_init_map(lock, name, key, sub) \
do { (void)(name); (void)(key); } while (0)
# define lockdep_set_class(lock, key) do { (void)(key); } while (0) # define lockdep_set_class(lock, key) do { (void)(key); } while (0)
# define lockdep_set_class_and_name(lock, key, name) \ # define lockdep_set_class_and_name(lock, key, name) \
do { (void)(key); } while (0) do { (void)(key); (void)(name); } while (0)
#define lockdep_set_class_and_subclass(lock, key, sub) \ #define lockdep_set_class_and_subclass(lock, key, sub) \
do { (void)(key); } while (0) do { (void)(key); } while (0)
#define lockdep_set_subclass(lock, sub) do { } while (0) #define lockdep_set_subclass(lock, sub) do { } while (0)
......
...@@ -136,7 +136,6 @@ ...@@ -136,7 +136,6 @@
static struct lock_class_key af_family_keys[AF_MAX]; static struct lock_class_key af_family_keys[AF_MAX];
static struct lock_class_key af_family_slock_keys[AF_MAX]; static struct lock_class_key af_family_slock_keys[AF_MAX];
#ifdef CONFIG_DEBUG_LOCK_ALLOC
/* /*
* Make lock validator output more readable. (we pre-construct these * Make lock validator output more readable. (we pre-construct these
* strings build-time, so that runtime initialization of socket * strings build-time, so that runtime initialization of socket
...@@ -187,7 +186,6 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = { ...@@ -187,7 +186,6 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
"clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" , "clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" ,
"clock-AF_MAX" "clock-AF_MAX"
}; };
#endif
/* /*
* sk_callback_lock locking rules are per-address-family, * sk_callback_lock locking rules are per-address-family,
......
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