Skip to content

Commit

Permalink
[ARM] 3983/2: remove unused argument to __bug()
Browse files Browse the repository at this point in the history
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 5047f09 incorrectly reverted
change from commit ff10952 (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>
  • Loading branch information
Nicolas Pitre authored and Russell King committed Dec 7, 2006
1 parent ca7aa4d commit 7174d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,12 +631,9 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
notify_die("unknown data abort code", regs, &info, instr, 0);
}

void __attribute__((noreturn)) __bug(const char *file, int line, void *data)
void __attribute__((noreturn)) __bug(const char *file, int line)
{
printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
if (data)
printk(" - extra data = %p", data);
printk("\n");
printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line);
*(int *)0 = 0;

/* Avoid "noreturn function does return" */
Expand Down
4 changes: 2 additions & 2 deletions include/asm-arm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
extern void __bug(const char *file, int line) __attribute__((noreturn));

/* give file/line information */
#define BUG() __bug(__FILE__, __LINE__, NULL)
#define BUG() __bug(__FILE__, __LINE__)

#else

Expand Down

0 comments on commit 7174d85

Please sign in to comment.