>>> On 24.08.17 at 18:27, <jgr...@suse.com> wrote: > On 24/08/17 17:35, Jan Beulich wrote: >>>>> On 23.08.17 at 19:34, <jgr...@suse.com> wrote: >>> --- a/xen/arch/x86/psr.c >>> +++ b/xen/arch/x86/psr.c >>> @@ -418,50 +418,66 @@ static const struct feat_props l2_cat_props = { >>> .write_msr = l2_cat_write_msr, >>> }; >>> >>> -static void __init parse_psr_bool(char *s, char *value, char *feature, >>> +static bool __init parse_psr_bool(const char *s, const char *value, >>> + const char *ss, const char *feature, >>> unsigned int mask) >>> { >>> - if ( !strcmp(s, feature) ) >>> + if ( !strncmp(s, feature, value - s) ) >>> { >>> - if ( !value ) >>> + if ( !*value ) >>> opt_psr |= mask; >>> else >>> { >>> - int val_int = parse_bool(value, NULL); >>> + int val_int = parse_bool(value + 1, ss); >> >> Why "+ 1" here? > > value points to the delimiter ('\0' or ',') now.
That's pretty counterintuitive and error prone, don't you think? At the very least the parameter then shouldn't be called "value". Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel