netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hannes@stressinduktion.org
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next v2] sock: make lockdep_sock_is_held inline and conditional on LOCKDEP
Date: Thu, 07 Apr 2016 20:40:54 -0400 (EDT)	[thread overview]
Message-ID: <20160407.204054.1721184100791312803.davem@davemloft.net> (raw)
In-Reply-To: <1460072118-10006-1-git-send-email-hannes@stressinduktion.org>

From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Fri,  8 Apr 2016 01:35:18 +0200

> lockdep_is_held is only specified if CONFIG_LOCKDEP is defined, so make
> it depending on it.
> 
> Also add the missing inline keyword, so no warnings about unused functions
> show up during complilation.
> 
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: David Miller <davem@davemloft.net>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

I already applied your inline patch, I applied the following:

====================
[PATCH] net: Fix build failure due to lockdep_sock_is_held().

Needs to be protected with CONFIG_LOCKDEP.

Based upon a patch by Hannes Frederic Sowa.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/net/sock.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/net/sock.h b/include/net/sock.h
index 46b2937..81d6fec 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1360,6 +1360,7 @@ do {									\
 	lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0);	\
 } while (0)
 
+#ifdef CONFIG_LOCKDEP
 static inline bool lockdep_sock_is_held(const struct sock *csk)
 {
 	struct sock *sk = (struct sock *)csk;
@@ -1367,6 +1368,7 @@ static inline bool lockdep_sock_is_held(const struct sock *csk)
 	return lockdep_is_held(&sk->sk_lock) ||
 	       lockdep_is_held(&sk->sk_lock.slock);
 }
+#endif
 
 void lock_sock_nested(struct sock *sk, int subclass);
 
-- 
2.1.0

      reply	other threads:[~2016-04-08  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 21:53 [PATCH net-next] sock: make lockdep_sock_is_held static inline Hannes Frederic Sowa
2016-04-07 22:01 ` David Miller
2016-04-07 22:30 ` Eric Dumazet
2016-04-07 22:37   ` Eric Dumazet
2016-04-07 22:47     ` Hannes Frederic Sowa
2016-04-07 23:08       ` Eric Dumazet
2016-04-07 23:13         ` Hannes Frederic Sowa
2016-04-07 23:35 ` [PATCH net-next v2] sock: make lockdep_sock_is_held inline and conditional on LOCKDEP Hannes Frederic Sowa
2016-04-08  0:40   ` David Miller [this message]

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=20160407.204054.1721184100791312803.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).