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=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 6AECBCA9EB6 for ; Wed, 23 Oct 2019 13:41:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4219220663 for ; Wed, 23 Oct 2019 13:41:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4219220663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E00D76B0003; Wed, 23 Oct 2019 09:41:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D89796B0006; Wed, 23 Oct 2019 09:41:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C52AC6B0007; Wed, 23 Oct 2019 09:41:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 9E8706B0003 for ; Wed, 23 Oct 2019 09:41:49 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 5186D180AD80F for ; Wed, 23 Oct 2019 13:41:49 +0000 (UTC) X-FDA: 76075162338.24.kite83_f8c6170f0052 X-HE-Tag: kite83_f8c6170f0052 X-Filterd-Recvd-Size: 2232 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 23 Oct 2019 13:41:46 +0000 (UTC) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 68646F7628D9BF9903EC; Wed, 23 Oct 2019 21:41:40 +0800 (CST) Received: from localhost.localdomain (10.90.53.225) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Wed, 23 Oct 2019 21:41:31 +0800 From: Chen Wandun To: , , , , , , , , , , , CC: Subject: [PATCH] mm/page_alloc: fix gcc compile warning Date: Wed, 23 Oct 2019 21:48:28 +0800 Message-ID: <1571838508-117928-1-git-send-email-chenwandun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected 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: From: Chenwandun mm/page_alloc.o: In function `page_alloc_init_late': mm/page_alloc.c:1956: undefined reference to `zone_pcp_update' mm/page_alloc.o:(.debug_addr+0x8350): undefined reference to `zone_pcp_update' make: *** [vmlinux] Error 1 zone_pcp_update is defined in CONFIG_MEMORY_HOTPLUG, so add ifdef when calling zone_pcp_update. Signed-off-by: Chenwandun --- mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f9488ef..8513150 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1952,8 +1952,10 @@ void __init page_alloc_init_late(void) * so the pcpu batch and high limits needs to be updated or the limits * will be artificially small. */ +#ifdef CONFIG_MEMORY_HOTPLUG for_each_populated_zone(zone) zone_pcp_update(zone); +#endif /* * We initialized the rest of the deferred pages. Permanently disable -- 2.7.4