From: Kees Cook <keescook@chromium.org>
To: Ingo Molnar <mingo@redhat.com>
Cc: Yang Shi <yang.shi@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
LKML <linux-kernel@vger.kernel.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com>
Subject: Re: [PATCH] lockdep: Include print_collision and helper functions in DEBUG_LOCKDEP
Date: Fri, 15 Apr 2016 10:06:44 -0700 [thread overview]
Message-ID: <CAGXu5jJDndDND5WN_ouN9FrRv9Octj0zB4KH4yoQ7342sp_Bdw@mail.gmail.com> (raw)
In-Reply-To: <1460595446-3010-1-git-send-email-yang.shi@linaro.org>
On Wed, Apr 13, 2016 at 5:57 PM, Yang Shi <yang.shi@linaro.org> wrote:
> pint_collosion and helper functions are just used when DEBUG_LOCKDEP is
> selected, so include them in #ifdef CONFIG_DEBUG_LOCKDEP to avoid the below
> "defined but not used" warning when DEBUG_LOCKDEP is off:
>
> kernel/locking/lockdep.c:2051:13: warning: 'print_collision' defined but not used [-Wunused-function]
> static void print_collision(struct task_struct *curr,
>
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
Thanks, I had noticed this warning too.
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> kernel/locking/lockdep.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 2324ba5..ed94109 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -1999,6 +1999,7 @@ static inline int get_first_held_lock(struct task_struct *curr,
> return ++i;
> }
>
> +#ifdef CONFIG_DEBUG_LOCKDEP
> /*
> * Returns the next chain_key iteration
> */
> @@ -2069,6 +2070,7 @@ static void print_collision(struct task_struct *curr,
> printk("\nstack backtrace:\n");
> dump_stack();
> }
> +#endif
>
> /*
> * Checks whether the chain and the current held locks are consistent
> --
> 2.0.2
>
--
Kees Cook
Chrome OS & Brillo Security
prev parent reply other threads:[~2016-04-15 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 0:57 Yang Shi
2016-04-15 17:06 ` Kees Cook [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=CAGXu5jJDndDND5WN_ouN9FrRv9Octj0zB4KH4yoQ7342sp_Bdw@mail.gmail.com \
--to=keescook@chromium.org \
--cc=alfredoalvarezfernandez@gmail.com \
--cc=arnd@arndb.de \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yang.shi@linaro.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
all inboxes | Powered by JetHome®