diff mbox series

[Xen-devel,02/27] xen/x86: srat: Don't check alloc_boot_pages return

Message ID 20170814142418.13267-3-julien.grall@arm.com
State Accepted
Commit 7a37e0ea7f0ccab389cecaa6baff0bb411236281
Headers show
Series xen/arm: Memory subsystem clean-up | expand

Commit Message

Julien Grall Aug. 14, 2017, 2:23 p.m. UTC
alloc_boot_pages will panic if it is not possible to allocate. So the
check in the caller is pointless.

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

Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/srat.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Andre Przywara Aug. 22, 2017, 11:23 a.m. UTC | #1
Hi,

On 14/08/17 15:23, Julien Grall wrote:
> alloc_boot_pages will panic if it is not possible to allocate. So the
> check in the caller is pointless.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Thanks,
Andre.

> ---
> 
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
>  xen/arch/x86/srat.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
> index cd1283e58c..95660a9bbc 100644
> --- a/xen/arch/x86/srat.c
> +++ b/xen/arch/x86/srat.c
> @@ -194,11 +194,6 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
>  		return;
>  	}
>  	mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
> -	if (!mfn) {
> -		printk(KERN_ERR "ACPI: Unable to allocate memory for "
> -		       "saving ACPI SLIT numa information.\n");
> -		return;
> -	}
>  	acpi_slit = mfn_to_virt(mfn);
>  	memcpy(acpi_slit, slit, slit->header.length);
>  }
>
diff mbox series

Patch

diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index cd1283e58c..95660a9bbc 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -194,11 +194,6 @@  void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
 		return;
 	}
 	mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
-	if (!mfn) {
-		printk(KERN_ERR "ACPI: Unable to allocate memory for "
-		       "saving ACPI SLIT numa information.\n");
-		return;
-	}
 	acpi_slit = mfn_to_virt(mfn);
 	memcpy(acpi_slit, slit, slit->header.length);
 }