Message ID | 1459469148-4827-1-git-send-email-ruscur@russell.cc |
---|---|
State | Deferred |
Headers | show |
On 01/04/16 11:05, Russell Currey wrote: > 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@russell.cc> We definitely don't want to scare off developers with right-angled triangles - systems programming already has an unfortunate reputation for being difficult and scary, and as an open source project we need to do everything we can to make it easier for people to join our community. This should probably head to stable - we don't want people being scared off when submitting bugfixes to the stable tree. Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> > --- > 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[]; >
Russell Currey <ruscur@russell.cc> writes: > 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@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[]; 낯
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[];
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@russell.cc> --- include/opal-internal.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)