aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-12-07 13:09:20 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-12-07 17:38:09 -0500
commit7174d852603ced7a161f47c6e3958073706114a9 (patch)
tree0e8982dbf5df32675cf9f1968ca97384059c945e
parentca7aa4de81178babca16df67a7b72a063a7c6891 (diff)
[ARM] 3983/2: remove unused argument to __bug()
It appears that include/asm-arm/bug.h requires include/linux/stddef.h for the definition of NULL. It seems that stddef.h was always included indirectly in most cases, and that issue was properly fixed a while ago. Then commit 5047f09b56d0bc3c21aec9cb16de60283da645c6 incorrectly reverted change from commit ff10952a547dad934d9ed9afc5cf579ed1ccb53a (bad dwmw2) and the problem recently resurfaced. Because the third argument to __bug() is never used anyway, RMK suggested getting rid of it entirely instead of readding #include <linux/stddef.h> which this patch does. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/traps.c7
-rw-r--r--include/asm-arm/bug.h4
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index bede380c07a9..042a12982e98 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -631,12 +631,9 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
631 notify_die("unknown data abort code", regs, &info, instr, 0); 631 notify_die("unknown data abort code", regs, &info, instr, 0);
632} 632}
633 633
634void __attribute__((noreturn)) __bug(const char *file, int line, void *data) 634void __attribute__((noreturn)) __bug(const char *file, int line)
635{ 635{
636 printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); 636 printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line);
637 if (data)
638 printk(" - extra data = %p", data);
639 printk("\n");
640 *(int *)0 = 0; 637 *(int *)0 = 0;
641 638
642 /* Avoid "noreturn function does return" */ 639 /* Avoid "noreturn function does return" */
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 0e36fd5d87df..7b62351f097d 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -4,10 +4,10 @@
4 4
5#ifdef CONFIG_BUG 5#ifdef CONFIG_BUG
6#ifdef CONFIG_DEBUG_BUGVERBOSE 6#ifdef CONFIG_DEBUG_BUGVERBOSE
7extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); 7extern void __bug(const char *file, int line) __attribute__((noreturn));
8 8
9/* give file/line information */ 9/* give file/line information */
10#define BUG() __bug(__FILE__, __LINE__, NULL) 10#define BUG() __bug(__FILE__, __LINE__)
11 11
12#else 12#else
13 13