scst_debug.h: Avoid that the sBUG() and sBUG_ON() definitions confuse the smatch static code checker

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-02-09 16:50:10 +00:00
parent 72968c9c15
commit 4177cd82a6

View File

@@ -72,6 +72,14 @@
#if !defined(INSIDE_KERNEL_TREE)
#ifdef CONFIG_SCST_DEBUG
#ifdef __CHECKER__
/*
* Avoid that the while (...) local_bh_enable() loop confuses the lock checking
* code in smatch.
*/
#define sBUG() BUG()
#define sBUG_ON(p) BUG_ON((p))
#else
#define sBUG() do { \
pr_crit("BUG at %s:%d\n", __FILE__, __LINE__); \
local_irq_enable(); \
@@ -90,6 +98,7 @@
BUG(); \
} \
} while (0)
#endif
#else