Paul Mundt 09682c1dd3 bug.h: Fix up CONFIG_BUG=n implicit function declarations.
Commit 2603efa31a03 ("bug.h: Fix up powerpc build regression") corrected
the powerpc build case and extended the __ASSEMBLY__ guards, but it also
got caught in pre-processor hell accidentally matching the else case of
CONFIG_BUG resulting in the BUG disabled case tripping up on
-Werror=implicit-function-declaration.

It's not possible to __ASSEMBLY__ guard the entire file as architecture
code needs to get at the BUGFLAG_WARNING definition in the GENERIC_BUG
case, but the rest of the CONFIG_BUG=y/n case needs to be guarded.

Rather than littering endless __ASSEMBLY__ checks in each of the if/else
cases we just move the BUGFLAG definitions up under their own
GENERIC_BUG test and then shove everything else under one big
__ASSEMBLY__ guard.

Build tested on all of x86 CONFIG_BUG=y, CONFIG_BUG=n, powerpc (due to
it's dependence on BUGFLAG definitions in assembly code), and sh (due to
not bringing in linux/kernel.h to satisfy the taint flag definitions used
by the generic bug code).

Hopefully that's the end of the corner cases and I can abstain from ever
having to touch this infernal header ever again.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <wfg@linux.intel.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-25 10:32:49 -07:00
..
2009-06-11 21:02:15 +02:00
2012-03-28 18:30:03 +01:00
2010-10-07 14:08:55 +01:00
2008-05-01 08:03:58 -07:00
2009-06-11 21:02:42 +02:00
2011-03-17 09:19:04 +08:00
2010-10-07 14:08:55 +01:00
2008-08-12 16:07:31 -07:00
2010-10-07 14:08:55 +01:00
2012-05-29 12:31:01 +03:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2012-02-23 20:19:04 -07:00
2010-09-10 10:56:51 +02:00
2009-06-11 21:02:15 +02:00
2012-05-04 12:46:40 +10:00
2009-06-11 21:02:15 +02:00
2011-03-17 09:19:04 +08:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2012-04-14 11:13:19 +10:00
2009-06-11 21:02:15 +02:00
2012-01-12 20:13:08 -08:00
2012-01-03 22:55:17 -05:00
2011-10-06 19:47:12 -04:00
2009-06-11 21:02:42 +02:00
2011-05-20 12:50:29 -07:00