From: Matt Mackall <mpm@selenic.com>
To: Joe Perches <joe@perches.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-arch@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] CONFIG_EMBEDDED and !CONFIG_PRINTK: remove WARN_ON and print_symbol strings
Date: Fri, 05 Nov 2010 15:35:01 -0500 [thread overview]
Message-ID: <1288989301.18612.3.camel@calx> (raw)
In-Reply-To: <1288826941.10236.65.camel@Joe-Laptop>
On Wed, 2010-11-03 at 16:29 -0700, Joe Perches wrote:
> Reduces text a bit.
Looks good to me.
Acked-by: Matt Mackall <mpm@selenic.com>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> include/asm-generic/bug.h | 11 +++++++++++
> include/linux/kallsyms.h | 4 ++++
> kernel/panic.c | 6 ++++++
> 3 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
> index c2c9ba0..0741436 100644
> --- a/include/asm-generic/bug.h
> +++ b/include/asm-generic/bug.h
> @@ -61,12 +61,23 @@ struct bug_entry {
> */
> #ifndef __WARN_TAINT
> #ifndef __ASSEMBLY__
> +
> +#ifdef CONFIG_PRINTK
> extern void warn_slowpath_fmt(const char *file, const int line,
> const char *fmt, ...) __attribute__((format(printf, 3, 4)));
> extern void warn_slowpath_fmt_taint(const char *file, const int line,
> unsigned taint, const char *fmt, ...)
> __attribute__((format(printf, 4, 5)));
> extern void warn_slowpath_null(const char *file, const int line);
> +#else
> +static inline void __attribute__((format(printf, 3, 4)))
> +warn_slowpath_fmt(const char *file, const int line, const char *fmt, ...) {}
> +static inline void __attribute__((format(printf, 4, 5)))
> +warn_slowpath_fmt_taint(const char *file, const int line,
> + unsigned taint, const char *fmt, ...) {}
> +static inline void warn_slowpath_null(const char *file, const int line) {}
> +#endif
> +
> #define WANT_WARN_ON_SLOWPATH
> #endif
> #define __WARN() warn_slowpath_null(__FILE__, __LINE__)
> diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
> index d8e9b3d..2e7e1e9 100644
> --- a/include/linux/kallsyms.h
> +++ b/include/linux/kallsyms.h
> @@ -100,12 +100,16 @@ static inline void __check_printsym_format(const char *fmt, ...)
> {
> }
>
> +#ifdef CONFIG_PRINTK
> static inline void print_symbol(const char *fmt, unsigned long addr)
> {
> __check_printsym_format(fmt, "");
> __print_symbol(fmt, (unsigned long)
> __builtin_extract_return_addr((void *)addr));
> }
> +#else
> +static inline void print_symbol(const char *fmt, unsigned long addr) {}
> +#endif
>
> static inline void print_ip_sym(unsigned long ip)
> {
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 4c13b1a..14d7539 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -357,6 +357,9 @@ void oops_exit(void)
> }
>
> #ifdef WANT_WARN_ON_SLOWPATH
> +
> +#ifdef CONFIG_PRINTK
> +
> struct slowpath_args {
> const char *fmt;
> va_list args;
> @@ -413,6 +416,9 @@ void warn_slowpath_null(const char *file, int line)
> TAINT_WARN, NULL);
> }
> EXPORT_SYMBOL(warn_slowpath_null);
> +
> +#endif
> +
> #endif
>
> #ifdef CONFIG_CC_STACKPROTECTOR
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Mathematics is the supreme nostalgia of our time.
prev parent reply other threads:[~2010-11-05 20:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 23:29 [PATCH] CONFIG_EMBEDDED and !CONFIG_PRINTK: remove WARN_ON and print_symbol strings Joe Perches
2010-11-05 20:35 ` Matt Mackall [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=1288989301.18612.3.camel@calx \
--to=mpm@selenic.com \
--cc=arnd@arndb.de \
--cc=dwmw2@infradead.org \
--cc=joe@perches.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
/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;
as well as URLs for NNTP newsgroup(s).