From: Denis Efremov Date: Wed, 28 Aug 2019 21:09:34 +0000 (+0300) Subject: asm-generic: add unlikely to default BUG_ON(x) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9b87647c665dbf93173ca2f43986902b59dfbbba;p=openwrt%2Fstaging%2Fblogic.git asm-generic: add unlikely to default BUG_ON(x) Add unlikely to default BUG_ON(x) in !CONFIG_BUG. It makes the define consistent with BUG_ON(x) in CONFIG_BUG. Signed-off-by: Denis Efremov Cc: Arnd Bergmann Cc: Signed-off-by: Arnd Bergmann --- diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index aa6c093d9ce9..7357a3c942a0 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -185,7 +185,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint, #endif #ifndef HAVE_ARCH_BUG_ON -#define BUG_ON(condition) do { if (condition) BUG(); } while (0) +#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) #endif #ifndef HAVE_ARCH_WARN_ON