From patchwork Tue Mar 21 17:05:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13182975 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 DE015C7619A for ; Tue, 21 Mar 2023 17:06:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B1346B0082; Tue, 21 Mar 2023 13:06:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76176900002; Tue, 21 Mar 2023 13:06:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6298D6B0085; Tue, 21 Mar 2023 13:06:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 562F96B0082 for ; Tue, 21 Mar 2023 13:06:24 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 26674C0224 for ; Tue, 21 Mar 2023 17:06:24 +0000 (UTC) X-FDA: 80593533888.10.8385893 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 67D37A0017 for ; Tue, 21 Mar 2023 17:06:22 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iP13+nPF; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679418382; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=exMOKirvI5JGq9PkpxuZWvG3dN5dcu17Uy4qDIwBrtA=; b=jVV7MDBtHoIss/E3f6G2YJOqj2oJPIo9EalYGYoujYdTL+OQUTAEDtwhPb57YumYefUaiO /XKRXNZIhh3gKqAk0jyHlNANQCJnCYmTO0tcwbGpmAdIE9Sllxxo41BO5wICwG7xTF8DCB wDaa5/qibMnjhV63seFUjadtn2m4iSk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iP13+nPF; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679418382; a=rsa-sha256; cv=none; b=Xc0SSRed1t44Uub3e6ti8K4rlcEcJo5ZoxMc014ngLZpLdnqP/D4Tvs6KhjlKy/qCeXa0h wu0ugRch6z1qCYwQTt6Gh8uh9al1Mw56xtjKb+09yN8hvuEs1oga2xpXVNKD13gQ9u0D0x ENlHQ/yRyWqI2oD3loGih7ew3HZ5GYY= 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 ams.source.kernel.org (Postfix) with ESMTPS id 2596DB818FB; Tue, 21 Mar 2023 17:06:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72A63C4339B; Tue, 21 Mar 2023 17:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679418379; bh=KhfLtALYKzODXFE/bKaEWmdPAncGVA8ZXqw3mr1syxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iP13+nPFKWexWO3d0/NXkearn4Tj8eWKPbGRJCvBjOENCtyJZblBuGz9AdeeUfjdA EMjeaK/CSluxUo7Ua2KaaJmij2/OzMp5dxXpPxj04YzyIGphxVJMKhOF4bXMSL94nz ol5MOh1u+X7joFijl49MvNJQdym1l9XEL8k6DV2Hki6DyjSX4rtuMvSy1ILwGRIi44 XrAoxjg2ZccTAZ8/36v34co5C40IvtmtGUbbKNLnmjVEj9VBI5qp0vymUpsAr05iX4 k26ZQ8N0iCz8C/Gsjz8cV7FjFtufjJ/T1bSEgNV3NbZ/t6IPG5KpyVbUKrbwbSXAmj 579oV8zZkoCuw== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , Doug Berger , Matthew Wilcox , Mel Gorman , Michal Hocko , Mike Rapoport , Thomas Bogendoerfer , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 13/14] mm: move vmalloc_init() declaration to mm/internal.h Date: Tue, 21 Mar 2023 19:05:12 +0200 Message-Id: <20230321170513.2401534-14-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230321170513.2401534-1-rppt@kernel.org> References: <20230321170513.2401534-1-rppt@kernel.org> MIME-Version: 1.0 X-Stat-Signature: 84aeudwpd9q418fpwohg5ugm1fzeh7in X-Rspam-User: X-Rspamd-Queue-Id: 67D37A0017 X-Rspamd-Server: rspam06 X-HE-Tag: 1679418382-577798 X-HE-Meta: U2FsdGVkX1+aSGmovd+6hU2i5ZmUTqY8f09mrPynk3LH5IlroGkEMvLN3ChqQVX2lXjLkv7SQTIViPBxTabdAu+owzIKnkRUkjWA5FeOhYhpFbIPJJcMtwKVWyU4jUncnOktAEMywxKAv1N9yzBhIcyUNJTKQqQ0H2ewuBcvyPf30At2suisI2CtAawrRcyTGiNGHM00PV4jQlmyAwSHxn1SjVAxMkz6IJ2eDSf5YVrjRTnq1PrZKv5bzKJa1r/O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sKr4oZ98LgkEqdtMfR5o05wahcfjG9Jjni2RT/DQPyG+yi8SsVdMTMYeYfo/eYQnSI5VetdvQ= 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: "Mike Rapoport (IBM)" vmalloc_init() is called only from mm_core_init(), there is no need to declare it in include/linux/vmalloc.h Move vmalloc_init() declaration to mm/internal.h Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka --- include/linux/vmalloc.h | 4 ---- mm/internal.h | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 69250efa03d1..351fc7697214 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -131,12 +131,8 @@ extern void *vm_map_ram(struct page **pages, unsigned int count, int node); extern void vm_unmap_aliases(void); #ifdef CONFIG_MMU -extern void __init vmalloc_init(void); extern unsigned long vmalloc_nr_pages(void); #else -static inline void vmalloc_init(void) -{ -} static inline unsigned long vmalloc_nr_pages(void) { return 0; } #endif diff --git a/mm/internal.h b/mm/internal.h index 02273c5e971f..c05ad651b515 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -900,9 +900,14 @@ size_t splice_folio_into_pipe(struct pipe_inode_info *pipe, * mm/vmalloc.c */ #ifdef CONFIG_MMU +void __init vmalloc_init(void); int vmap_pages_range_noflush(unsigned long addr, unsigned long end, pgprot_t prot, struct page **pages, unsigned int page_shift); #else +static inline void vmalloc_init(void) +{ +} + static inline int vmap_pages_range_noflush(unsigned long addr, unsigned long end, pgprot_t prot, struct page **pages, unsigned int page_shift)