lib: sbi: add some macros to detect BUG at runtime
authorXiang W <wxjstz@126.com>
Thu, 16 Sep 2021 04:32:49 +0000 (12:32 +0800)
committerAnup Patel <anup@brainfault.org>
Wed, 22 Sep 2021 08:05:30 +0000 (13:35 +0530)
commit12753d22563f7d2d01f2c6644c7b66b06eb5c90f
treef1813ef20b2af5219a5481d1062262454152e2ac
parent3477f08b08da6bfd904218fdb76b3db592dd7ebd
lib: sbi: add some macros to detect BUG at runtime

Three macros are added. One is called BUG, which is used to put in an
unreachable branch. One is called BUG_ON, which is used to check bugs
and assert conditions are opposite. One is called SBI_ASSERT, used for
assertion checking.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
include/sbi/sbi_console.h