All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] locking/lockdep: remove print_lock_trace function
@ 2019-05-16 19:13 Anders Roxell
  2019-05-24  8:10 ` [tip:locking/core] locking/lockdep: Remove the unused print_lock_trace() function tip-bot for Anders Roxell
  2019-05-24 18:44 ` [PATCH] locking/lockdep: remove print_lock_trace function Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Anders Roxell @ 2019-05-16 19:13 UTC (permalink / raw)
  To: peterz, mingo, will.deacon; +Cc: linux-kernel, 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)

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(-)

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
 
 /*
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:locking/core] locking/lockdep: Remove the unused print_lock_trace() function
  2019-05-16 19:13 [PATCH] locking/lockdep: remove print_lock_trace function Anders Roxell
@ 2019-05-24  8:10 ` tip-bot for Anders Roxell
  2019-05-24 18:44 ` [PATCH] locking/lockdep: remove print_lock_trace function Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Anders Roxell @ 2019-05-24  8:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, torvalds, peterz, tglx, mingo, anders.roxell, hpa

Commit-ID:  c0090c4c85c27d1fa3d785c935501b7207cd2869
Gitweb:     https://git.kernel.org/tip/c0090c4c85c27d1fa3d785c935501b7207cd2869
Author:     Anders Roxell <anders.roxell@linaro.org>
AuthorDate: Thu, 16 May 2019 21:13:26 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: will.deacon@arm.com
Fixes: c120bce78065 ("lockdep: Simplify stack trace handling")
Link: http://lkml.kernel.org/r/20190516191326.27003-1-anders.roxell@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/locking/lockdep.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 6b283b4f87aa..8d32ae7768a7 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -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
 
 /*

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] locking/lockdep: remove print_lock_trace function
  2019-05-16 19:13 [PATCH] locking/lockdep: remove print_lock_trace function Anders Roxell
  2019-05-24  8:10 ` [tip:locking/core] locking/lockdep: Remove the unused print_lock_trace() function tip-bot for Anders Roxell
@ 2019-05-24 18:44 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-05-24 18:44 UTC (permalink / raw)
  To: Anders Roxell; +Cc: peterz, mingo, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-24 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 19:13 [PATCH] locking/lockdep: remove print_lock_trace function Anders Roxell
2019-05-24  8:10 ` [tip:locking/core] locking/lockdep: Remove the unused print_lock_trace() function tip-bot for Anders Roxell
2019-05-24 18:44 ` [PATCH] locking/lockdep: remove print_lock_trace function Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.