[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 22/52] xen/arch/x86/x86_64/mmconfig-shared.c: let custom parameter parsing routines return errno



>>> On 14.08.17 at 09:08, <jgross@xxxxxxxx> wrote:
> @@ -37,13 +37,24 @@ static void __init parse_mmcfg(char *s)
>          if ( ss )
>              *ss = '\0';
>  
> -        if ( !parse_bool(s) )
> +        switch ( parse_bool(s) ) {
> +        case 0:
>              pci_probe &= ~PCI_PROBE_MMCONF;
> -        else if ( !strcmp(s, "amd_fam10") || !strcmp(s, "amd-fam10") )
> -            pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF;
> +            break;
> +        case 1:
> +            break;
> +        default:
> +            if ( !strcmp(s, "amd_fam10") || !strcmp(s, "amd-fam10") )
> +                pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF;
> +            else
> +                return -EINVAL;
> +            break;
> +        }
>  
>          s = ss + 1;
>      } while ( ss );

Same here (and wherever else I may have overlooked it) - you
should not return out of loops.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.