[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200916184528.498184-5-kuba@kernel.org>
Date: Wed, 16 Sep 2020 11:45:25 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net, paulmck@...nel.org, joel@...lfernandes.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
rcu@...r.kernel.org, josh@...htriplett.org, peterz@...radead.org,
christian.brauner@...ntu.com, Jakub Kicinski <kuba@...nel.org>,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us
Subject: [PATCH net-next 4/7] net: sched: remove broken definitions and un-hide for !LOCKDEP
We're trying to make LOCKDEP-related function declarations
visible to the compiler and depend on dead code elimination
to remove them.
Fix up the situation with lockdep_tcf_chain_is_locked() and
lockdep_tcf_proto_is_locked().
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
--
CC: jhs@...atatu.com
CC: xiyou.wangcong@...il.com
CC: jiri@...nulli.us
---
include/net/sch_generic.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index d60e7c39d60c..1aaa9e3d2e9c 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -432,7 +432,6 @@ struct tcf_block {
struct mutex proto_destroy_lock; /* Lock for proto_destroy hashtable. */
};
-#ifdef CONFIG_PROVE_LOCKING
static inline bool lockdep_tcf_chain_is_locked(struct tcf_chain *chain)
{
return lockdep_is_held(&chain->filter_chain_lock);
@@ -442,17 +441,6 @@ static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp)
{
return lockdep_is_held(&tp->lock);
}
-#else
-static inline bool lockdep_tcf_chain_is_locked(struct tcf_block *chain)
-{
- return true;
-}
-
-static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp)
-{
- return true;
-}
-#endif /* #ifdef CONFIG_PROVE_LOCKING */
#define tcf_chain_dereference(p, chain) \
rcu_dereference_protected(p, lockdep_tcf_chain_is_locked(chain))
--
2.26.2
Powered by blists - more mailing lists