From patchwork Tue Mar 21 08:30:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 72756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1660102wrt; Tue, 21 Mar 2023 01:43:28 -0700 (PDT) X-Google-Smtp-Source: AK7set+gR08THBxwTcOJYiXbzXcOrmSFy9pr8OLRr3AnW240qdUoKE0AyAXEJHtkWdqluxIu8+s6 X-Received: by 2002:a17:90b:50d:b0:237:ae98:a47f with SMTP id r13-20020a17090b050d00b00237ae98a47fmr1460051pjz.1.1679388208435; Tue, 21 Mar 2023 01:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679388208; cv=none; d=google.com; s=arc-20160816; b=rJs9D5zC7rC5B4qZBZ0Lc3XtxE++/F+roBhesKnhVEQxeBXSfRmIHIf9ZRzdTUoVXZ jxwVx2gzgpBhXEAV59lQi6Vkq/u4hlFdez7r4i70L1Rxif7fZ6nnI+rpyo1+EKNvQGuw rP6K4bmJI3ZBmx6myOoftcFmEo7+uP/PiRezmchTOWVVf9FKJzzSLDFb1Cpon5mgVNy9 wIgTUz9TbVKRnfPlOXD0iLyKqTdbOKXx9huOGWOsg0rIHjyVKiZbwPAs3gQ7ni8P6kBW YFJgYqXJ52vrR0o0Sb1VCBTiPio0lw0B3/1SabJ8OMaL/77EWS7Cjn4/bilb5rQ8jHlb 1GoA== 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 :message-id:date:subject:cc:to:from; bh=JU2KGO7hMIMmKn7/4GppMdGXO2OELXN8RzbIXO4KOGY=; b=MBzNojAU6sy0L9UDIjrQtXgseF1TsQh+fYIG2NEFgivaDrbp17YzSPAjQ4p+4Is6je AL99aMeSZinkU2p5rW7Ptx4rXMX5A4tnb14gU0FV9pHVhhMXMVEjM+FBnG0QgrzV7dEb QnOVfSjbMAogEb+FCpAFZtq7K8kCJWHXRQ/saowp3+wfryjypd6NJsfG25L2UTGEjLs2 xpOK84YNP13zH7prgibhy+N+33rlHCDgikpHOEPhxbBKnNd+dtU8a3vK4smUwo7tt/DT HKMv6Kpg3ixO9rP/s0h8U50mW+eCpUAR5vun08wDOQUrPfLmWRDCnQvK3F4C/uKMyLZ/ EP/A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi7-20020a17090b4b4700b0023f692a5033si11685926pjb.135.2023.03.21.01.43.13; Tue, 21 Mar 2023 01:43:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbjCUIcW (ORCPT + 99 others); Tue, 21 Mar 2023 04:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbjCUIcH (ORCPT ); Tue, 21 Mar 2023 04:32:07 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBDF6A73 for ; Tue, 21 Mar 2023 01:31:10 -0700 (PDT) Received: from ramsan.of.borg ([84.195.187.55]) by michel.telenet-ops.be with bizsmtp id awX12900E1C8whw06wX1Zd; Tue, 21 Mar 2023 09:31:08 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1peXNr-00E6VQ-Gp; Tue, 21 Mar 2023 09:31:01 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1peXOX-007g6A-62; Tue, 21 Mar 2023 09:31:01 +0100 From: Geert Uytterhoeven To: Dave Hansen , Arnd Bergmann , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: John Paul Adrian Glaubitz , linux-mm@kvack.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Randy Dunlap Subject: [PATCH] mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP Date: Tue, 21 Mar 2023 09:30:59 +0100 Message-Id: <67261c513706241d479b8b4cf46eb4e6fb0417ba.1679387262.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760966170142553374?= X-GMAIL-MSGID: =?utf-8?q?1760966170142553374?= sh/migor_defconfig: mm/slab.c: In function ‘slab_memory_callback’: mm/slab.c:1127:23: error: implicit declaration of function ‘init_cache_node_node’; did you mean ‘drain_cache_node_node’? [-Werror=implicit-function-declaration] 1127 | ret = init_cache_node_node(nid); | ^~~~~~~~~~~~~~~~~~~~ | drain_cache_node_node The #ifdef condition protecting the definition of init_cache_node_node() no longer matches the conditions protecting the (multiple) users. Fix this by syncing the conditions. Fixes: 76af6a054da40553 ("mm/migrate: add CPU hotplug to demotion #ifdef") Reported-by: Randy Dunlap Link: https://lore.kernel.org/r/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Acked-by: Randy Dunlap --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slab.c b/mm/slab.c index ba454246ee13dd4d..de1523a78f2e7367 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -839,7 +839,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) return 0; } -#if (defined(CONFIG_NUMA) && defined(CONFIG_MEMORY_HOTPLUG)) || defined(CONFIG_SMP) +#if defined(CONFIG_NUMA) || defined(CONFIG_SMP) /* * Allocates and initializes node for a node on each slab cache, used for * either memory or cpu hotplug. If memory is being hot-added, the kmem_cache_node