diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
commit | ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch) | |
tree | ad434400f5ecaa33b433c8f830e40792d8d6c05c /include/asm-generic/bug.h | |
parent | 90356ac3194bf91a441a5f9c3067af386ef62462 (diff) | |
parent | 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff) |
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'include/asm-generic/bug.h')
-rw-r--r-- | include/asm-generic/bug.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index e5913c3b715a..400c2b41896e 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | #ifdef CONFIG_BUG | ||
7 | #ifndef HAVE_ARCH_BUG | 8 | #ifndef HAVE_ARCH_BUG |
8 | #define BUG() do { \ | 9 | #define BUG() do { \ |
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 10 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
@@ -11,13 +12,6 @@ | |||
11 | } while (0) | 12 | } while (0) |
12 | #endif | 13 | #endif |
13 | 14 | ||
14 | #ifndef HAVE_ARCH_PAGE_BUG | ||
15 | #define PAGE_BUG(page) do { \ | ||
16 | printk("page BUG for page at %p\n", page); \ | ||
17 | BUG(); \ | ||
18 | } while (0) | ||
19 | #endif | ||
20 | |||
21 | #ifndef HAVE_ARCH_BUG_ON | 15 | #ifndef HAVE_ARCH_BUG_ON |
22 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) | 16 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) |
23 | #endif | 17 | #endif |
@@ -31,4 +25,18 @@ | |||
31 | } while (0) | 25 | } while (0) |
32 | #endif | 26 | #endif |
33 | 27 | ||
28 | #else /* !CONFIG_BUG */ | ||
29 | #ifndef HAVE_ARCH_BUG | ||
30 | #define BUG() | ||
31 | #endif | ||
32 | |||
33 | #ifndef HAVE_ARCH_BUG_ON | ||
34 | #define BUG_ON(condition) do { if (condition) ; } while(0) | ||
35 | #endif | ||
36 | |||
37 | #ifndef HAVE_ARCH_WARN_ON | ||
38 | #define WARN_ON(condition) do { if (condition) ; } while(0) | ||
39 | #endif | ||
40 | #endif | ||
41 | |||
34 | #endif | 42 | #endif |