Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp832492rwb; Thu, 22 Sep 2022 07:01:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM400GRXOJDs8Q+56+qWzB99p6fZTu+zIUGw7wQtuafRO3imQxghsruL0OYzlFM0rDR205M5 X-Received: by 2002:a05:6402:40c2:b0:44f:963d:1ab4 with SMTP id z2-20020a05640240c200b0044f963d1ab4mr3507169edb.319.1663855317920; Thu, 22 Sep 2022 07:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855317; cv=none; d=google.com; s=arc-20160816; b=jvr8eBivsqcbWp370Rt+YZ5010gsPC7eAXTaARcn06+fQskLtic5kSBlxLLWl/F7ka PMHf4Zxht54oAo6XhHHJNrv8KN5s9mIF9qR+vGUXrKFmULkE6Onnmq/NxBAq3MKBPwVu U3VyR0ZQYi7JBEZvwV1Q9HNxVvSSUCrDAFdwYb9ClbiFXKmzVNhdtbubcEGRVBAvFb6H CAxSxhj241UxIqkaGQxW0JBY0TinaELt34xJTOSamb4AHJ83t6laIxSZbpbUL82UFqUC nmlALR0sp3JaJLJarORFG4/R0KIw2jxbC/i4WdXlGpn40Dpn3TZZ79Eo8msUS4YWK96O dL6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=34qWwJlHpP5N4za9rIs/++NAn26bH7QJ8mD/w5opMhc=; b=ZqOx02G4G89+1ulOihi/OPpoS1RDkWJKk3/BjoGWgbSLUtuX75zJpL5jwMp4hmom2Z Y0/QaofPayTSty/e24tdKkh0uUC6JUl+7XHjvMw9jPwqsPUX3hhc1erP6QayR3+dQLnJ m90tRFc5oKaD/A/NThOFZnvHi32sN+b3ONYArESEfHQyYGVDCS+wsEPHDAsfA8lE5A28 dkS7xQJxaN9rpXhq2kzjNCL7Oz1caPo6xxtQdtemZdUKgexZTAM8TPPgLGWtGHmDh5o8 rb9ngQ4YjQwH+P6qPYOBBibb6BDEafBlWgV0jmtRsvXEcyuO9C/RrvSDPkN07Q3LO+aH 6SBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a50cd4f000000b00447dfae6181si5531287edj.235.2022.09.22.07.01.22; Thu, 22 Sep 2022 07:01:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbiIVNp5 (ORCPT + 99 others); Thu, 22 Sep 2022 09:45:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231384AbiIVNp0 (ORCPT ); Thu, 22 Sep 2022 09:45:26 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5C5895F8 for ; Thu, 22 Sep 2022 06:45:23 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MYGdh6ySvz14QZm; Thu, 22 Sep 2022 21:41:12 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 21:45:21 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 21:45:20 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v3 6/8] ACPI: HMAT: use hotplug_memory_notifier() directly Date: Thu, 22 Sep 2022 22:19:02 +0800 Message-ID: <20220922141904.3245505-7-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922141904.3245505-1-liushixin2@huawei.com> References: <20220922141904.3245505-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since patch 316346243be6 has already updated the minimum gcc version to 5.1. The previous problem mentioned in patch f02c69680088 is not existed. So we can now revert to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Signed-off-by: Liu Shixin --- drivers/acpi/numa/hmat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index c3d783aca196..84dffb3dc30e 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -768,11 +768,6 @@ static int hmat_callback(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block hmat_callback_nb = { - .notifier_call = hmat_callback, - .priority = 2, -}; - static __init void hmat_free_structures(void) { struct memory_target *target, *tnext; @@ -855,7 +850,7 @@ static __init int hmat_init(void) hmat_register_targets(); /* Keep the table and structures if the notifier may use them */ - if (!register_hotmemory_notifier(&hmat_callback_nb)) + if (!hotplug_memory_notifier(hmat_callback, 2)) return 0; out_put: hmat_free_structures(); -- 2.25.1