From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42A5CC4743E for ; Tue, 8 Jun 2021 12:20:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D7B386128A for ; Tue, 8 Jun 2021 12:20:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7B386128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5FB3F6B006C; Tue, 8 Jun 2021 08:20:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D2686B006E; Tue, 8 Jun 2021 08:20:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49A9D6B0070; Tue, 8 Jun 2021 08:20:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 1C6E36B006C for ; Tue, 8 Jun 2021 08:20:37 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B862E8249980 for ; Tue, 8 Jun 2021 12:20:36 +0000 (UTC) X-FDA: 78230464872.04.AFCD4BB Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by imf21.hostedemail.com (Postfix) with ESMTP id 41CDEE00026B for ; Tue, 8 Jun 2021 12:20:32 +0000 (UTC) Received: by mail-oi1-f181.google.com with SMTP id a21so21357255oiw.3 for ; Tue, 08 Jun 2021 05:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OmTdNAirSU2hkyrUMU+ARQjy6bvUlpwnEGNeFoKbjA8=; b=NoNXzzUJET6mD90UhuLO4KlMmHr7tZnRc8nHJhp5Q+3g/1wGzScjrz+yg7RdKpcXcm d/hCyfu3TqLg6N9+78YFDy3ISQssCO/SsHx/aIBcjdAC4Qz1s2iXCiuy97RZginY7nGZ DvX6bKqKsK6GQ0Sep7Xxo30JMCG7Motp8n8odPc+YMC/Dob2e+/fZpTKRVe7MfNVBGff wvxvkfzOErQs9i6uImuxTFhk/mFZ9Wf5HyOoBHpjceB01pohMZdtRfhT1qcJLxK+7h2R dQBFFWzmP3Yp6EBi5WCNimghF3cmYEru/1+bg8vjEeztfpwezWCV+cJE+tfgs7RRH561 IIyw== X-Gm-Message-State: AOAM533lcCcMn4P8n4lkJ0Uvlt/sODTqqsCDyWbKGQVL8uvBA05wqitH jB2O+hCi0IpA1MpZpSKt4wQXlH02lLspu468Rrc= X-Google-Smtp-Source: ABdhPJzGnwuhGOuzkrFQmGHEbYgJZPCAHMUb8TTYp305sD+8WsA0diJEPnVIIf53jR51n274a7P1CxE1tcKsGbw4YpI= X-Received: by 2002:aca:b406:: with SMTP id d6mr2621167oif.71.1623154835851; Tue, 08 Jun 2021 05:20:35 -0700 (PDT) MIME-Version: 1.0 References: <20210607195430.48228-1-david@redhat.com> <20210607195430.48228-9-david@redhat.com> In-Reply-To: <20210607195430.48228-9-david@redhat.com> From: "Rafael J. Wysocki" Date: Tue, 8 Jun 2021 14:20:24 +0200 Message-ID: Subject: Re: [PATCH v1 08/12] ACPI: memhotplug: memory resources cannot be enabled yet To: David Hildenbrand Cc: Linux Kernel Mailing List , Andrew Morton , Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Marek Kedzierski , Hui Zhu , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , virtualization@lists.linux-foundation.org, Linux Memory Management List , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf21.hostedemail.com: domain of rjwysocki@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=rjwysocki@gmail.com X-Stat-Signature: otbq68zf9rwu9icew8w8qak83dufbs1e X-Rspamd-Queue-Id: 41CDEE00026B X-Rspamd-Server: rspam06 X-HE-Tag: 1623154832-563286 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 7, 2021 at 9:55 PM David Hildenbrand wrote: > > We allocate + initialize everything from scratch. In case enabling the > device fails, we free all memory resourcs. > > Signed-off-by: David Hildenbrand Acked-by: Rafael J. Wysocki > --- > 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 >