mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user