diff mbox

[v2,01/52] xen/arch/arm/acpi/boot.c: let custom parameter parsing routines return errno

Message ID 20170814070849.20986-2-jgross@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jürgen Groß Aug. 14, 2017, 7:07 a.m. UTC
Modify the custom parameter parsing routines in:

xen/arch/arm/acpi/boot.c

to indicate whether the parameter value was parsed successfully.

Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/arm/acpi/boot.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Julien Grall Aug. 14, 2017, 2:26 p.m. UTC | #1
Hi Juergen,

On 14/08/17 08:07, Juergen Gross wrote:
> Modify the custom parameter parsing routines in:
>
> xen/arch/arm/acpi/boot.c
>
> to indicate whether the parameter value was parsed successfully.
>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Julien Grall <julien.grall@arm.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,
diff mbox

Patch

diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c
index 889208a0ea..0b90cf3a15 100644
--- a/xen/arch/arm/acpi/boot.c
+++ b/xen/arch/arm/acpi/boot.c
@@ -193,16 +193,20 @@  static int __init acpi_parse_fadt(struct acpi_table_header *table)
 static bool_t __initdata param_acpi_off;
 static bool_t __initdata param_acpi_force;
 
-static void __init parse_acpi_param(char *arg)
+static int __init parse_acpi_param(char *arg)
 {
     if ( !arg )
-        return;
+        return -EINVAL;
 
     /* Interpret the parameter for use within Xen. */
     if ( !parse_bool(arg) )
         param_acpi_off = true;
     else if ( !strcmp(arg, "force") ) /* force ACPI to be enabled */
         param_acpi_force = true;
+    else
+        return -EINVAL;
+
+    return 0;
 }
 custom_param("acpi", parse_acpi_param);