Skip to contentSkip to conversation

locking/lockdep: remove print_lock_trace function

PATCH In review Anders Roxell 3 participants 3 messages May 16, 2019 – May 24, 2019 Locking primitives

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 locking/lockdep: remove print_lock_trace function

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")
---
 kernel/locking/lockdep.c | 4 ----
 1 file changed, 4 deletions(-)
kernel/locking/lockdep.c +0 -4
index d06190fa5082..df1bd3ba56bc 100644
@@ -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
 
 /*
Signature · 1 line
2.20.1
#1 lore raw

[tip:locking/core] locking/lockdep: Remove the unused print_lock_trace() function

locking/lockdep: Remove the unused print_lock_trace() function
Commit-ID:  c0090c4c85c27d1fa3d785c935501b7207cd2869
Gitweb:     https://git.kernel.org/tip/c0090c4c85c27d1fa3d785c935501b7207cd2869
Author:     Anders Roxell <[email protected]>
AuthorDate: Thu, 16 May 2019 21:13:26 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 24 May 2019 09:05:46 +0200

locking/lockdep: Remove the unused print_lock_trace() function

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]

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

Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes c120bce78065 ("lockdep: Simplify stack trace handling")
---
 kernel/locking/lockdep.c | 4 ----
 1 file changed, 4 deletions(-)
kernel/locking/lockdep.c +0 -4
index 6b283b4f87aa..8d32ae7768a7 100644
@@ -2818,10 +2818,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
 
 /*
Acked-by on v1 1/1
#2 lore raw
In reply to Anders Roxell
Quoted 8 lines · Anders Roxell

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)

Quoted 7 lines

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

Fixes c120bce78065 ("lockdep: Simplify stack trace handling")
---
 kernel/locking/lockdep.c | 4 ----
 1 file changed, 4 deletions(-)

Will