On Fri, Dec 14, 2007 at 09:38:44AM -0600, Matt Mackall wrote:
> 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?
Maybe.
> > +void out_of_line_warnon(char *file, unsigned int line, const char *func);
>
> How about __warn_on?
I'm easily swayed :)
> > +void out_of_line_warnon(char *file, unsigned int line, const char *func)
>
> Might as well make *file const too.
ok
> > 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..
no, up top we added a print_tainted() call to BUG()
BUG() gets used in modules == needs its ancillary functions
also exported.
Dave
--
http://www.codemonkey.org.uk
--
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Martin Michlmayr | Network slowdown due to CFS |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Christos Zoulas | Re: Boot device confusion |
| Manuel Bouyer | Re: NFSv3 bug |
| Anders Magnusson | Re: setsockopt() compat issue |
| Martin Husemann | Re: Compressed vnd handling tested successfully |
