[Skiboot] [PATCH] opal-internal: Refactor __test_args into a pyramid

Russell Currey ruscur at russell.cc
Fri Apr 1 11:05:48 AEDT 2016


The __test_argsX symbols are a hacky workaround with a warning beforehand,
warning the user to look away.  This would be a lot more pleasant if they
were arranged as a pyramid.

Signed-off-by: Russell Currey <ruscur at russell.cc>
---
 include/opal-internal.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/opal-internal.h b/include/opal-internal.h
index 5e41e10..ffccb65 100644
--- a/include/opal-internal.h
+++ b/include/opal-internal.h
@@ -33,14 +33,14 @@ static struct opal_table_entry __e_##__func __used __section(".opal_table") = \
 { .func = __func, .token = __tok,					\
   .nargs = __nargs + 0 * sizeof(__func( __test_args##__nargs )) }
 
-/* Make sure function takes args they claim.  Look away now... */
+/* Make sure function takes args they claim.  Behold the pyramid! */
 #define __test_args0
-#define __test_args1 0
-#define __test_args2 0,0
-#define __test_args3 0,0,0
-#define __test_args4 0,0,0,0
-#define __test_args5 0,0,0,0,0
-#define __test_args6 0,0,0,0,0,0
+#define __test_args1       0
+#define __test_args2      0,0
+#define __test_args3     0,0,0
+#define __test_args4    0,0,0,0
+#define __test_args5   0,0,0,0,0
+#define __test_args6  0,0,0,0,0,0
 #define __test_args7 0,0,0,0,0,0,0
 
 extern struct opal_table_entry __opal_table_start[];
-- 
2.8.0



More information about the Skiboot mailing list