public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Dave Jones <davej@redhat.com>, Adrian Bunk <bunk@kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@muc.de>
Subject: Re: Print taint info in more places.
Date: Fri, 14 Dec 2007 09:38:44 -0600	[thread overview]
Message-ID: <20071214153844.GS17536@waste.org> (raw)
In-Reply-To: <20071214013041.GH22304@redhat.com>

On Thu, Dec 13, 2007 at 08:30:41PM -0500, Dave Jones wrote:
>  #ifndef HAVE_ARCH_BUG
>  #define BUG() do { \
> -	printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
> +	printk(KERN_ERR "BUG: failure at %s:%d/%s()! (%s)\n",
> +		__FILE__, __LINE__, __FUNCTION__, print_tainted()); \
>  	panic("BUG!"); \
>  } while (0)

Might as well make this inline too, no?

>  #endif
> @@ -32,13 +37,11 @@ struct bug_entry {
>  #endif
>  
>  #ifndef HAVE_ARCH_WARN_ON
> +void out_of_line_warnon(char *file, unsigned int line, const char *func);

How about __warn_on?

> diff --git a/init/main.c b/init/main.c
> index 80b04b6..b1fad76 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -855,3 +855,11 @@ static int __init kernel_init(void * unused)
>  	init_post();
>  	return 0;
>  }
> +
> +void out_of_line_warnon(char *file, unsigned int line, const char *func)

Might as well make *file const too.

> diff --git a/kernel/panic.c b/kernel/panic.c
> index 6f6e03e..198fc58 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -173,6 +173,7 @@ const char *print_tainted(void)
>  		snprintf(buf, sizeof(buf), "Not tainted");
>  	return(buf);
>  }
> +EXPORT_SYMBOL(print_tainted);

Looks like you've got two patches here..

-- 
Mathematics is the supreme nostalgia of our time.

  parent reply	other threads:[~2007-12-14 15:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 22:49 Print taint info in more places Dave Jones
2007-12-13 23:08 ` Andi Kleen
2007-12-13 23:43   ` Mauricio Mauad Menegaz Filho
2007-12-13 23:52   ` Dave Jones
2007-12-14  0:12     ` Dave Jones
2007-12-14  0:03 ` Adrian Bunk
2007-12-14  0:16   ` Dave Jones
2007-12-14  1:30   ` Dave Jones
2007-12-14  7:25     ` Jeremy Fitzhardinge
2007-12-14  7:55       ` Dave Jones
2007-12-14 15:38     ` Matt Mackall [this message]
2007-12-14 16:56       ` Dave Jones
2007-12-14 12:09 ` Jon Masters

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=20071214153844.GS17536@waste.org \
    --to=mpm@selenic.com \
    --cc=ak@muc.de \
    --cc=bunk@kernel.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.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