struct lockdep_map is empty when CONFIG_DEBUG_LOCK_ALLOC=n. We can
remove the ifdeffery while adding the lockdep map in struct srcu_struct
without risking consuming space in the off-case. This will also simplify
further manipulations on this field.

Signed-off-by: Frederic Weisbecker <frede...@kernel.org>
Cc: Uladzislau Rezki <ure...@gmail.com>
Cc: Boqun Feng <boqun.f...@gmail.com>
Cc: Lai Jiangshan <jiangshan...@gmail.com>
Cc: Neeraj Upadhyay <neer...@codeaurora.org>
Cc: Josh Triplett <j...@joshtriplett.org>
Cc: Joel Fernandes <j...@joelfernandes.org>
---
 include/linux/srcutree.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
index 9cfcc8a756ae..cb1f4351e8ba 100644
--- a/include/linux/srcutree.h
+++ b/include/linux/srcutree.h
@@ -82,9 +82,7 @@ struct srcu_struct {
                                                /*  callback for the barrier */
                                                /*  operation. */
        struct delayed_work work;
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
        struct lockdep_map dep_map;
-#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
 };
 
 /* Values for state variable (bottom bits of ->srcu_gp_seq). */
-- 
2.25.1

Reply via email to