Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp387355rwb; Thu, 22 Sep 2022 20:29:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74Fe0VgtxBMebiEyGanXrNz5JuRL1BzlCR9Tk1kcbN41qOUsc393ZZlYqZP9QDIuW9kzWJ X-Received: by 2002:a05:6402:50cc:b0:451:bf26:8c51 with SMTP id h12-20020a05640250cc00b00451bf268c51mr6408151edb.336.1663903770673; Thu, 22 Sep 2022 20:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663903770; cv=none; d=google.com; s=arc-20160816; b=0NNmGjtfUSZJxTY6gGEF5I8ZCYt2VofwthXkUO13fKHAAY11yYaQGv3GbV2QzA/9+i Ph7Wc/vEn9favv+yaejiomvhNxAfHHbzpcojP1TS62CVNvKhVM/vxWBX6BP8BWKwEI0g tarhc5GxrjqegQZ3qDi9qn9R5rKfpVB/hG7XJiv7W3jWhta8hFDsqEYk4wqplntb7B6M eYFRMXpsOGSTlLYNxLCdwHtbX6CXjMymO8raPZjcbcQkGXEdz1bJv4SbVhslDSIrq1WR WR3FF9ERN2kpoaZx58cOdMKSVUxNJf+MJH/E+CuN2wmJMBLSagPE2LFgybG7H21w1ynq Aj8A== 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=dh7YZN0mnqIEU56xcvPyejU/3appSBHpFm3kjNVN2Jk=; b=V8SOq9pl77D0whxX/CdGu71DYnq3KClZs3AksdLKzrsbV7455NfP41XB6cwC3juNYm +rI4L1I1hBoigb9zW5vS04DhiXxxf1J1CQ0AXr2z6K9TKPu4V71LqPApJJg77J8Pjobu 6FDRvHN8s7xQZoq105YanriDuX3UfSfwhvrnd6ovp2k00HYXKQ0twpR9SNvXqbeXK4Qx Cl+xO4/PpnSy7rZMTxx997voxGu4pgNOTtAy5G08hZTvyVSysK7t7Q+jLga0+tFvD+kn QkDK24iwSU7L/dYZlkTzUCAaQtT9IoOwE2WI8hGhHkHTTzXLIV5rXHuE7O3QsNshbkvj Ljng== 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 x67-20020a50bac9000000b00452ce356136si5958428ede.135.2022.09.22.20.29.05; Thu, 22 Sep 2022 20:29:30 -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 S232399AbiIWDA5 (ORCPT + 99 others); Thu, 22 Sep 2022 23:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbiIWDAQ (ORCPT ); Thu, 22 Sep 2022 23:00:16 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9166EF34 for ; Thu, 22 Sep 2022 20:00:13 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYcH21wl3zWgst; Fri, 23 Sep 2022 10:56:14 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 11:00:12 +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; Fri, 23 Sep 2022 11:00:11 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v4 6/8] ACPI: HMAT: use hotplug_memory_notifier() directly Date: Fri, 23 Sep 2022 11:33:45 +0800 Message-ID: <20220923033347.3935160-7-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220923033347.3935160-1-liushixin2@huawei.com> References: <20220923033347.3935160-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: dggems706-chm.china.huawei.com (10.3.19.183) 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 Reviewed-by: David Hildenbrand --- 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