Loosely handle all the softirq vectors verbosity under the same
function.
Reviewed-by: David S. Miller <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Joel Fernandes <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Pavan Kondeti <[email protected]>
Cc: Paul E . McKenney <[email protected]>
Cc: David S . Miller <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
---
kernel/locking/lockdep.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index d1bfe5eff708..0988de06a7ed 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2757,17 +2757,13 @@ static int SOFTIRQ_verbose(struct lock_class *class)
#define STRICT_READ_CHECKS 1
-static int (*state_verbose_f[])(struct lock_class *class) = {
-#define LOCKDEP_STATE(__STATE) \
- __STATE##_verbose,
-#include "lockdep_states.h"
-#undef LOCKDEP_STATE
-};
-
static inline int state_verbose(enum lock_usage_bit bit,
struct lock_class *class)
{
- return state_verbose_f[bit >> 2](class);
+ if (bit < LOCK_USED_IN_SOFTIRQ)
+ return HARDIRQ_verbose(class);
+ else
+ return SOFTIRQ_verbose(class);
}
typedef int (*check_usage_f)(struct task_struct *, struct held_lock *,
--
2.21.0