lkml.org 
[lkml]   [2012]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: build failure after merge of the origin tree
On Mon, Jun 04, 2012 at 12:57:24PM +1000, Stephen Rothwell wrote:
> Hi Al,
>
> Building the origin tree (v3.5-rc1 sh lboxre2_defconfig and other sh
> configs) failed like this:
>
> arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)
>
> Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
> without SIGPENDING (and never should be)"). Missing include of kernel.h.
>
Ideally bug.h should be including linux/kernel.h itself due to its
TAINT_WARN dependence, it just seems to be getting lucky on other
platforms who either don't have this combination or pull in kernel.h from
somewhere else.

That commit also introduces a linux/bug.h include for WARN_ON() in
linux/thread_info.h which would be similarly insufficient for any
TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK platform that also uses
asm-generic/bug.h.

Given that, I'd prefer stuffing the include in asm-generic directly:

---
bug.h: need linux/kernel.h for TAINT_WARN.

asm-generic/bug.h uses taint flags that are only defined in
linux/kernel.h, resulting in build failures on platforms that
don't include linux/kernel.h some other way:

arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)

Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
without SIGPENDING (and never should be)").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 2520a6e..9f02005 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -2,6 +2,7 @@
#define _ASM_GENERIC_BUG_H

#include <linux/compiler.h>
+#include <linux/kernel.h>

#ifdef CONFIG_BUG


\
 
 \ /
  Last update: 2012-06-04 10:21    [from the cache]
©2003-2011 Jasper Spaans