From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net, paulmck@kernel.org, joel@joelfernandes.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
rcu@vger.kernel.org, josh@joshtriplett.org, peterz@infradead.org,
christian.brauner@ubuntu.com, Jakub Kicinski <kuba@kernel.org>,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us
Subject: [PATCH net-next 4/7] net: sched: remove broken definitions and un-hide for !LOCKDEP
Date: Wed, 16 Sep 2020 11:45:25 -0700 [thread overview]
Message-ID: <20200916184528.498184-5-kuba@kernel.org> (raw)
In-Reply-To: <20200916184528.498184-1-kuba@kernel.org>
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@kernel.org>
--
CC: jhs@mojatatu.com
CC: xiyou.wangcong@gmail.com
CC: jiri@resnulli.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
next prev parent reply other threads:[~2020-09-16 18:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 18:45 [PATCH net-next 0/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition Jakub Kicinski
2020-09-16 18:45 ` [PATCH net-next 1/7] sched: un-hide lockdep_tasklist_lock_is_held() for !LOCKDEP Jakub Kicinski
2020-09-16 18:45 ` [PATCH net-next 2/7] rcu: un-hide lockdep maps " Jakub Kicinski
2020-09-16 18:45 ` [PATCH net-next 3/7] net: un-hide lockdep_sock_is_held() " Jakub Kicinski
2020-09-16 18:45 ` Jakub Kicinski [this message]
2020-09-16 18:45 ` [PATCH net-next 5/7] srcu: use a more appropriate lockdep helper Jakub Kicinski
2020-09-16 18:45 ` [PATCH net-next 6/7] lockdep: provide dummy forward declaration of *_is_held() helpers Jakub Kicinski
2020-09-17 15:14 ` peterz
2020-09-16 18:45 ` [PATCH net-next 7/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition Jakub Kicinski
2020-09-16 23:15 ` [PATCH net-next 0/7] " Paul E. McKenney
2020-09-17 0:48 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200916184528.498184-5-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=christian.brauner@ubuntu.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox