summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-02-04 00:31:20 +0000
committerAndre Przywara <andre.przywara@arm.com>2016-02-04 09:08:46 +0000
commit4511a5c3d8f140e2c32dd32e04668555b25f43bf (patch)
treee3c5e7bef9defc0bba5ad4232f6ef92c6ba5d4f4
parent378759eb3325267f423258357dde521d6f9cff97 (diff)
arisc: make debug macros -pedantic compatible
Allwinner removed "-pedantic" from the list of CFLAGS to get away with some conditional debug macros using a GNU extension. Fix those macros to use a standard compliant syntax and re-enable -pedantic.
-rw-r--r--Makefile2
-rw-r--r--plat/sun50iw1p1/scp/include/arisc_dbgs.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8177820..85d651f 100644
--- a/Makefile
+++ b/Makefile
@@ -227,7 +227,7 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
-Werror -Wmissing-include-dirs \
-mgeneral-regs-only -D__ASSEMBLY__ \
${DEFINES} ${INCLUDES}
-CFLAGS += -nostdinc -ffreestanding -Wall \
+CFLAGS += -nostdinc -pedantic -ffreestanding -Wall \
-Werror -Wmissing-include-dirs \
-mgeneral-regs-only -std=c99 -c -Os \
${DEFINES} ${INCLUDES}
diff --git a/plat/sun50iw1p1/scp/include/arisc_dbgs.h b/plat/sun50iw1p1/scp/include/arisc_dbgs.h
index aef8f5e..79ca603 100644
--- a/plat/sun50iw1p1/scp/include/arisc_dbgs.h
+++ b/plat/sun50iw1p1/scp/include/arisc_dbgs.h
@@ -37,21 +37,21 @@
#define DEBUG_LEVEL_WRN ((uint32_t)1 << 2)
#define DEBUG_LEVEL_ERR ((uint32_t)1 << 3)
-#define ARISC_INF(format, args...) \
+#define ARISC_INF(...) \
if(DEBUG_LEVEL_INF & (0xf0 >> (arisc_debug_level +1))) \
- tf_printf("[SCP] :"format, ##args);
+ tf_printf("[SCP] :" __VA_ARGS__);
-#define ARISC_LOG(format, args...) \
+#define ARISC_LOG(...) \
if(DEBUG_LEVEL_LOG & (0xf0 >> (arisc_debug_level +1))) \
- tf_printf("[SCP] :"format, ##args);
+ tf_printf("[SCP] :" __VA_ARGS__);
-#define ARISC_WRN(format, args...) \
+#define ARISC_WRN(...) \
if(DEBUG_LEVEL_WRN & (0xf0 >> (arisc_debug_level +1))) \
- tf_printf("[SCP WARING] :"format, ##args);
+ tf_printf("[SCP WARING] :" __VA_ARGS__);
-#define ARISC_ERR(format, args...) \
+#define ARISC_ERR(...) \
if(DEBUG_LEVEL_ERR & (0xf0 >> (arisc_debug_level +1))) \
- tf_printf("[SCP ERROR] :"format, ##args);
+ tf_printf("[SCP ERROR] :" __VA_ARGS__);
#else /* ARISC_DEBUG_ON */
#define ARISC_INF(...)