lkml.org 
[lkml]   [2018]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()
Date
BUG_ON() is unlikely() to BUG()

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Shuah Khan <shuah@kernel.org>
---
tools/testing/selftests/vm/map_populate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/map_populate.c b/tools/testing/selftests/vm/map_populate.c
index 6b8aeaa0bf7a..ca3f54765897 100644
--- a/tools/testing/selftests/vm/map_populate.c
+++ b/tools/testing/selftests/vm/map_populate.c
@@ -23,7 +23,7 @@

#define BUG_ON(condition, description) \
do { \
- if (condition) { \
+ if (unlikely(condition)) { \
fprintf(stderr, "[FAIL]\t%s:%d\t%s:%s\n", __func__, \
__LINE__, (description), strerror(errno)); \
exit(1); \
--
2.17.1
\
 
 \ /
  Last update: 2018-08-31 00:37    [W:0.036 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site