Message ID | 20170816125219.5255-9-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 16.08.17 at 14:51, <jgross@suse.com> wrote: > Modify the custom parameter parsing routines in: > > xen/arch/x86/genapic/probe.c > > to indicate whether the parameter value was parsed successfully. > > Cc: Jan Beulich <jbeulich@suse.com> > Cc: Andrew Cooper <andrew.cooper3@citrix.com> > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index 9a147ff64a..af3745aa21 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -44,12 +44,17 @@ void __init generic_bigsmp_probe(void) } } -static void __init genapic_apic_force(char *str) +static int __init genapic_apic_force(const char *str) { - int i; + int i, rc = -EINVAL; + for (i = 0; apic_probe[i]; i++) - if (!strcmp(apic_probe[i]->name, str)) + if (!strcmp(apic_probe[i]->name, str)) { genapic = apic_probe[i]; + rc = 0; + } + + return rc; } custom_param("apic", genapic_apic_force);
Modify the custom parameter parsing routines in: xen/arch/x86/genapic/probe.c to indicate whether the parameter value was parsed successfully. Cc: Jan Beulich <jbeulich@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> --- V3: - dont return out of loop (Jan Beulich) --- xen/arch/x86/genapic/probe.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)