summaryrefslogtreecommitdiff
path: root/include/linux/bug.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-04-04 00:28:13 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-04-04 06:43:08 -0800
commit978c16040525ffe1199bed6afd799eaa64d0f01c (patch)
tree789f68229be0af9579238a6d1e86af576ab33b3d /include/linux/bug.h
parent64c325ef483c863c720a7f53c6b3126e583e05a0 (diff)
Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull, which aren't aligned - was a legit bug
Diffstat (limited to 'include/linux/bug.h')
-rw-r--r--include/linux/bug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h
index f01e5f7c..aa5776c7 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -22,10 +22,10 @@
#define WARN(cond, ...) assert(!(cond))
#define WARN_ON(condition) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
+ int __ret_warn_on = unlikely(!!(condition)); \
+ if (__ret_warn_on) \
__WARN(); \
- unlikely(__ret_warn_on); \
+ __ret_warn_on; \
})
#endif /* __TOOLS_LINUX_BUG_H */