[Skiboot] [PATCH 02/10] sparse: Silence "directive in argument list" for version string

Stewart Smith stewart at linux.ibm.com
Thu Jul 18 16:51:09 AEST 2019


core/init.c:966:1: error: directive in argument list
core/init.c:968:1: error: directive in argument list
core/init.c:970:1: error: directive in argument list

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/init.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/core/init.c b/core/init.c
index c99302c86500..e3e0ea380bb2 100644
--- a/core/init.c
+++ b/core/init.c
@@ -66,6 +66,12 @@ static bool kernel_32bit;
 /* We backup the previous vectors here before copying our own */
 static uint8_t old_vectors[EXCEPTION_VECTORS_END];
 
+#ifdef DEBUG
+#define DEBUG_STR "-debug"
+#else
+#define DEBUG_STR ""
+#endif
+
 #ifdef SKIBOOT_GCOV
 void skiboot_gcov_done(void);
 #endif
@@ -962,13 +968,8 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* Call library constructors */
 	do_ctors();
 
-	prlog(PR_NOTICE, "OPAL %s%s starting...\n", version,
-#ifdef DEBUG
-	"-debug"
-#else
-	""
-#endif
-	);
+	prlog(PR_NOTICE, "OPAL %s%s starting...\n", version, DEBUG_STR);
+
 	prlog(PR_DEBUG, "initial console log level: memory %d, driver %d\n",
 	       (debug_descriptor.console_log_levels >> 4),
 	       (debug_descriptor.console_log_levels & 0x0f));
-- 
2.21.0



More information about the Skiboot mailing list