xen/arch/x86/genapic/probe.c: let custom parameter parsing routines return errno
authorJuergen Gross <jgross@suse.com>
Wed, 23 Aug 2017 17:34:00 +0000 (19:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Aug 2017 14:14:42 +0000 (16:14 +0200)
Modify the custom parameter parsing routines in:

xen/arch/x86/genapic/probe.c

to indicate whether the parameter value was parsed successfully.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/genapic/probe.c

index 9a147ff64a6932d3c2fd169c129d0490afc89c12..af3745aa21f61a6c59de8bd62dfd2f97c842d475 100644 (file)
@@ -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);