diff mbox series

[v1,08/12] ACPI: memhotplug: memory resources cannot be enabled yet

Message ID 20210607195430.48228-9-david@redhat.com (mailing list archive)
State New, archived
Headers show
Series mm/memory_hotplug: "auto-movable" online policy and memory groups | expand

Commit Message

David Hildenbrand June 7, 2021, 7:54 p.m. UTC
We allocate + initialize everything from scratch. In case enabling the
device fails, we free all memory resourcs.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 drivers/acpi/acpi_memhotplug.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Rafael J. Wysocki June 8, 2021, 12:20 p.m. UTC | #1
On Mon, Jun 7, 2021 at 9:55 PM David Hildenbrand <david@redhat.com> wrote:
>
> We allocate + initialize everything from scratch. In case enabling the
> device fails, we free all memory resourcs.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/acpi/acpi_memhotplug.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
> index 1d01d9414c40..eb4faf7c5cad 100644
> --- a/drivers/acpi/acpi_memhotplug.c
> +++ b/drivers/acpi/acpi_memhotplug.c
> @@ -182,10 +182,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
>          * (i.e. memory-hot-remove function)
>          */
>         list_for_each_entry(info, &mem_device->res_list, list) {
> -               if (info->enabled) { /* just sanity check...*/
> -                       num_enabled++;
> -                       continue;
> -               }
>                 /*
>                  * If the memory block size is zero, please ignore it.
>                  * Don't try to do the following memory hotplug flowchart.
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 1d01d9414c40..eb4faf7c5cad 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -182,10 +182,6 @@  static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
 	 * (i.e. memory-hot-remove function)
 	 */
 	list_for_each_entry(info, &mem_device->res_list, list) {
-		if (info->enabled) { /* just sanity check...*/
-			num_enabled++;
-			continue;
-		}
 		/*
 		 * If the memory block size is zero, please ignore it.
 		 * Don't try to do the following memory hotplug flowchart.