diff options
author | Denis Efremov <efremov@linux.com> | 2019-08-29 00:09:34 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-09-02 00:53:39 +0300 |
commit | 9b87647c665dbf93173ca2f43986902b59dfbbba (patch) | |
tree | 7c8d0697d6718fad3ffde8bd3e2cb41eaf118ecd /include/asm-generic/bug.h | |
parent | 602828c1aade576ac5f3fbd59b4eb014c5fc2414 (diff) | |
download | linux-9b87647c665dbf93173ca2f43986902b59dfbbba.tar.xz |
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 <efremov@linux.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic/bug.h')
-rw-r--r-- | include/asm-generic/bug.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |