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

Re: [Xen-devel] [PATCH v2 1/7] x86: clean up psr boot parameter parsing



>>> On 19.03.15 at 11:41, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> +static void __init parse_psr_bool(char* s, char* value, char* feature, int 
> bit)
> +{
> +    if ( !strcmp(s, feature) )
> +    {
> +        if ( !value )
> +            opt_psr |= bit;
> +        else
> +        {
> +            int val_int = parse_bool(value);
> +
> +            if ( val_int == 1 )
> +                opt_psr |= bit;
> +            else if ( val_int != 0 )
> +                printk("PSR: unknown %s value: %s\n", feature, value);
> +        }

Even more so that now you try to consolidate and re-use this, you
should honor the "off" case as much as the "on" one, i.e. explicitly
disable a feature if it was requested to be off.

Jan


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


 


Rackspace

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