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>
This commit is contained in:
Родитель
602828c1aa
Коммит
9b87647c66
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче