diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 20561a60db9c..1e7977582277 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -178,14 +178,17 @@ void __warn(const char *file, int line, void *caller, unsigned taint, }) #else /* !CONFIG_BUG */ -#ifndef HAVE_ARCH_BUG -#define BUG() do {} while (1) +#ifdef HAVE_ARCH_BUG +#undef BUG #endif -#ifndef HAVE_ARCH_BUG_ON -#define BUG_ON(condition) do { if (condition) BUG(); } while (0) +#ifdef HAVE_ARCH_BUG_ON +#undef BUG_ON #endif +#define BUG_ON(condition) do { if (condition) BUG(); } while (0) +#define BUG() do {} while (1) + #ifndef HAVE_ARCH_WARN_ON #define WARN_ON(condition) ({ \ int __ret_warn_on = !!(condition); \