diff options
author | Denis Efremov <efremov@linux.com> | 2019-08-28 17:09:34 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-09-01 17:53:39 -0400 |
commit | 9b87647c665dbf93173ca2f43986902b59dfbbba (patch) | |
tree | 7c8d0697d6718fad3ffde8bd3e2cb41eaf118ecd | |
parent | 602828c1aade576ac5f3fbd59b4eb014c5fc2414 (diff) |
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>
-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, | |||
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | #ifndef HAVE_ARCH_BUG_ON | 187 | #ifndef HAVE_ARCH_BUG_ON |
188 | #define BUG_ON(condition) do { if (condition) BUG(); } while (0) | 188 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #ifndef HAVE_ARCH_WARN_ON | 191 | #ifndef HAVE_ARCH_WARN_ON |