[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 01/12] xen: use macros for filling parameter definition blocks
>>> On 18.09.18 at 08:02, <jgross@xxxxxxxx> wrote: > Define macros for filling struct kernel_param when defining parameters. > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > --- > xen/include/xen/init.h | 58 > +++++++++++++++++--------------------------------- > 1 file changed, 20 insertions(+), 38 deletions(-) The diffstat perhaps makes this a worthwhile patch even independent of the rest of the series (i.e. if and how much of a re-work will be needed). > --- a/xen/include/xen/init.h > +++ b/xen/include/xen/init.h > @@ -101,72 +101,54 @@ extern const struct kernel_param __param_start[], > __param_end[]; > __attribute__((__aligned__(1))) char > #define __kparam __param(__initsetup) > > +#define def_custom_param(_name, _func) \ > + { .name = _name, \ > + .type = OPT_CUSTOM, \ > + .par.func = _func } > +#define def_var_param(_name, _type, _var) \ > + { .name = _name, \ > + .type = _type, \ > + .len = sizeof(_var), \ > + .par.var = &_var } May I ask that at least in the new macros you introduce you do away with the bogus leading underscores? Personally I have no issue with single character macro parameter names (I say that because simply dropping the underscores will obviously not work). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |