diff mbox series

locking/lockdep: remove print_lock_trace function

Message ID 20190516191326.27003-1-anders.roxell@linaro.org
State New
Headers show
Series locking/lockdep: remove print_lock_trace function | expand

Commit Message

Anders Roxell May 16, 2019, 7:13 p.m. UTC
gcc warns that function print_lock_trace() is unused if
CONFIG_PROVE_LOCKING isn't set.

../kernel/locking/lockdep.c:2820:13: warning: ‘print_lock_trace’ defined
   but not used [-Wunused-function]
 static void print_lock_trace(struct lock_trace *trace, unsigned int
   spaces)

Rework so we remove the function if CONFIG_PROVE_LOCKING isn't set.

Fixes: c120bce78065 ("lockdep: Simplify stack trace handling")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

---
 kernel/locking/lockdep.c | 4 ----
 1 file changed, 4 deletions(-)

-- 
2.20.1

Comments

Will Deacon May 24, 2019, 6:44 p.m. UTC | #1
On Thu, May 16, 2019 at 09:13:26PM +0200, Anders Roxell wrote:
> gcc warns that function print_lock_trace() is unused if

> CONFIG_PROVE_LOCKING isn't set.

> 

> ../kernel/locking/lockdep.c:2820:13: warning: ‘print_lock_trace’ defined

>    but not used [-Wunused-function]

>  static void print_lock_trace(struct lock_trace *trace, unsigned int

>    spaces)

> 

> Rework so we remove the function if CONFIG_PROVE_LOCKING isn't set.

> 

> Fixes: c120bce78065 ("lockdep: Simplify stack trace handling")

> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

> ---

>  kernel/locking/lockdep.c | 4 ----

>  1 file changed, 4 deletions(-)


Acked-by: Will Deacon <will.deacon@arm.com>


Will
diff mbox series

Patch

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index d06190fa5082..df1bd3ba56bc 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2816,10 +2816,6 @@  static inline int validate_chain(struct task_struct *curr,
 {
 	return 1;
 }
-
-static void print_lock_trace(struct lock_trace *trace, unsigned int spaces)
-{
-}
 #endif
 
 /*