Commit 46546abe authored by Adam Wujek's avatar Adam Wujek

Kconfig: rename ASSERT to PPSI_ASSERT

To avoid conflict with WRPC's ASSERT
Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 3d5e853b
......@@ -236,11 +236,11 @@ config VLAN_ARRAY_SIZE
endmenu
config ASSERT
bool "Build assertion checks in the code"
config PPSI_ASSERT
bool "Build assertion checks in the PPSI code"
default n
help
Build assertions in the code, to catch unexpected situations.
Build assertions in the PPSI code, to catch unexpected situations.
When an assertion fails the code loops over repeating the
error message every second. OTOH, panic() is always built,
with no Kconfig -- and it does the same, unconditionally.
......@@ -520,9 +520,9 @@ config ARCH_IS_WRPC
default 1 if ARCH_WRPC
default 0
config HAS_ASSERT
config HAS_PPSI_ASSERT
int
range 0 1
default 1 if ASSERT
default 1 if PPSI_ASSERT
default 0
\ No newline at end of file
......@@ -48,7 +48,7 @@ CONFIG_HAS_PROFILE_CUSTOM=0
CONFIG_HAS_VLAN=y
CONFIG_VLAN=y
CONFIG_VLAN_ARRAY_SIZE=1
# CONFIG_ASSERT is not set
# CONFIG_PPSI_ASSERT is not set
CONFIG_NR_FOREIGN_RECORDS=1
CONFIG_SINGLE_FMASTER=y
CONFIG_NR_PORTS=1
......@@ -83,4 +83,4 @@ CONFIG_HAS_CODEOPT_EPC_ENABLED=0
CONFIG_HAS_CODEOPT_SO_ENABLED=0
CONFIG_ARCH_IS_WRS=0
CONFIG_ARCH_IS_WRPC=1
CONFIG_HAS_ASSERT=0
CONFIG_HAS_PPSI_ASSERT=0
......@@ -48,7 +48,7 @@ CONFIG_HAS_MULTIPLE_VLAN=y
CONFIG_VLAN=y
CONFIG_MAX_VLANS_PER_PORT=32
CONFIG_VLAN_ARRAY_SIZE=32
# CONFIG_ASSERT is not set
# CONFIG_PPSI_ASSERT is not set
CONFIG_NR_FOREIGN_RECORDS=5
# CONFIG_SINGLE_FMASTER is not set
CONFIG_NR_PORTS=18
......@@ -79,4 +79,4 @@ CONFIG_HAS_CODEOPT_EPC_ENABLED=0
CONFIG_HAS_CODEOPT_SO_ENABLED=0
CONFIG_ARCH_IS_WRS=1
CONFIG_ARCH_IS_WRPC=0
CONFIG_HAS_ASSERT=0
CONFIG_HAS_PPSI_ASSERT=0
......@@ -12,11 +12,11 @@ extern void panic(const char *fmt, ...)
__attribute__((format(printf,1,2)));
#define assert(cond, fmt, ...) \
if (CONFIG_HAS_ASSERT && !(cond)) \
if (CONFIG_HAS_PPSI_ASSERT && !(cond)) \
__assert(__func__, __LINE__, 1 /* forever */, fmt, ## __VA_ARGS__)
#define assert_warn(cond, fmt, ...) \
if (CONFIG_HAS_ASSERT && !(cond)) \
if (CONFIG_HAS_PPSI_ASSERT && !(cond)) \
__assert(__func__, __LINE__, 0 /* once */, fmt, ## __VA_ARGS__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment