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

Re: [Xen-devel] [PATCH 1/7] xen/arm: acpi: Rework acpi_boot_table_init error paths



On Fri, Feb 03, 2017 at 07:18:46PM +0000, Julien Grall wrote:
> There are multiple path disable ACPI on error. Consolidate in a single
> place, this will help in a follow-up patch to add more code on the error
> path.
> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
> ---
>  xen/arch/arm/acpi/boot.c | 25 ++++++++++++++-----------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c
> index c3242a0..889208a 100644
> --- a/xen/arch/arm/acpi/boot.c
> +++ b/xen/arch/arm/acpi/boot.c
> @@ -234,7 +234,7 @@ static int __init dt_scan_depth1_nodes(const void *fdt, 
> int node,
>   */
>  int __init acpi_boot_table_init(void)
>  {
> -    int error;
> +    int error = 0;
>  
>      /*
>       * Enable ACPI instead of device tree unless
> @@ -245,10 +245,7 @@ int __init acpi_boot_table_init(void)
>      if ( param_acpi_off || ( !param_acpi_force
>                               && 
> device_tree_for_each_node(device_tree_flattened,
>                                                     dt_scan_depth1_nodes, 
> NULL)))
> -    {
> -        disable_acpi();
> -        return 0;
> -    }
> +        goto disable;
>  
>      /*
>       * ACPI is disabled at this point. Enable it in order to parse
> @@ -260,16 +257,22 @@ int __init acpi_boot_table_init(void)
>      error = acpi_table_init();
>      if ( error )
>      {
> -        disable_acpi();
> -        return error;
> +        printk("%s: Unable to initialize table parser (%d)\n",
> +               __FUNCTION__, error);

Please use __func__ instead.

Wei.

_______________________________________________
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®.