|
@@ -197,7 +197,13 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
|
|
|
_raw_spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \
|
|
|
} while (0)
|
|
|
#else
|
|
|
-# define raw_spin_lock_nested(lock, subclass) _raw_spin_lock(lock)
|
|
|
+/*
|
|
|
+ * Always evaluate the 'subclass' argument to avoid that the compiler
|
|
|
+ * warns about set-but-not-used variables when building with
|
|
|
+ * CONFIG_DEBUG_LOCK_ALLOC=n and with W=1.
|
|
|
+ */
|
|
|
+# define raw_spin_lock_nested(lock, subclass) \
|
|
|
+ _raw_spin_lock(((void)(subclass), (lock)))
|
|
|
# define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock)
|
|
|
#endif
|
|
|
|