From patchwork Tue Mar 22 21:42:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789123 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F201AC433F5 for ; Tue, 22 Mar 2022 21:42:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 932F56B00CA; Tue, 22 Mar 2022 17:42:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BB986B00CB; Tue, 22 Mar 2022 17:42:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 75DB76B00CC; Tue, 22 Mar 2022 17:42:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 5FDC86B00CA for ; Tue, 22 Mar 2022 17:42:47 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2CFA124409 for ; Tue, 22 Mar 2022 21:42:47 +0000 (UTC) X-FDA: 79273347174.15.A098A5F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id A8B1EC001A for ; Tue, 22 Mar 2022 21:42:46 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2857E60A14; Tue, 22 Mar 2022 21:42:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E61AC340EE; Tue, 22 Mar 2022 21:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985365; bh=mPKzudlzJ9FrbxOIvBg6s/Z3UnRNW3NEEw4AvYzkQms=; h=Date:To:From:In-Reply-To:Subject:From; b=V2vzQDFCGt6BdNeVyLtyGfOfFwl1eE6jujWz4746NaHZdloDZWbIHhQJOEFAZHF90 2O2gF3qI1svoSXUn38kuraatY6afo6ieEKeH65kzjMjrULICUg5v9ILgU9o1yQO0y4 4e/g4AoLBWP/HiGWf4JeDScVsWJKwRFhVpbJT5fk= Date: Tue, 22 Mar 2022 14:42:44 -0700 To: rppt@linux.ibm.com,linmiaohe@huawei.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 083/227] mm/sparse: make mminit_validate_memmodel_limits() static Message-Id: <20220322214245.7E61AC340EE@smtp.kernel.org> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A8B1EC001A X-Stat-Signature: d4qtbfhpffq45ph3ciaea84pb7yfquay X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=V2vzQDFC; dmarc=none; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1647985366-289155 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: Miaohe Lin Subject: mm/sparse: make mminit_validate_memmodel_limits() static It's only used in the sparse.c now. So we can make it static and further clean up the relevant code. Link: https://lkml.kernel.org/r/20220127093221.63524-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton --- mm/internal.h | 11 ----------- mm/sparse.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) --- a/mm/internal.h~mm-sparse-make-mminit_validate_memmodel_limits-static +++ a/mm/internal.h @@ -572,17 +572,6 @@ static inline void mminit_verify_zonelis } #endif /* CONFIG_DEBUG_MEMORY_INIT */ -/* mminit_validate_memmodel_limits is independent of CONFIG_DEBUG_MEMORY_INIT */ -#if defined(CONFIG_SPARSEMEM) -extern void mminit_validate_memmodel_limits(unsigned long *start_pfn, - unsigned long *end_pfn); -#else -static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn, - unsigned long *end_pfn) -{ -} -#endif /* CONFIG_SPARSEMEM */ - #define NODE_RECLAIM_NOSCAN -2 #define NODE_RECLAIM_FULL -1 #define NODE_RECLAIM_SOME 0 --- a/mm/sparse.c~mm-sparse-make-mminit_validate_memmodel_limits-static +++ a/mm/sparse.c @@ -126,7 +126,7 @@ static inline int sparse_early_nid(struc } /* Validate the physical addressing limitations of the model */ -void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, +static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, unsigned long *end_pfn) { unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);