[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460070722-18652-1-git-send-email-hannes@stressinduktion.org>
Date: Fri, 8 Apr 2016 01:12:02 +0200
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>
Subject: [PATCH net] lockdep: provide always true lockdep_is_held stub if lockdep disabled
I need this to provide a generic lockdep_sock_is_held function which can
be easily used in the kernel without using ifdef PROVEN macros.
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>
Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
Hello Peter and Ingo,
if it is possible coud this go in via the net-tree, as this problem is
visible there already? Would be happy to get a review.
Thanks,
Hannes
include/linux/lockdep.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index d026b190c53066..dc8d447cb3ab1c 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -428,6 +428,8 @@ struct lock_class_key { };
#define lockdep_pin_lock(l) do { (void)(l); } while (0)
#define lockdep_unpin_lock(l) do { (void)(l); } while (0)
+#define lockdep_is_held(l) ({ (void)(l); (1); })
+
#endif /* !LOCKDEP */
#ifdef CONFIG_LOCK_STAT
--
2.5.5
Powered by blists - more mailing lists