From patchwork Sun Mar 19 22:00:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13180643 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 0007DC7618A for ; Sun, 19 Mar 2023 22:01:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8FDAA900011; Sun, 19 Mar 2023 18:01:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AD81900002; Sun, 19 Mar 2023 18:01:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77550900011; Sun, 19 Mar 2023 18:01:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 672A0900002 for ; Sun, 19 Mar 2023 18:01:16 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 38D311404B1 for ; Sun, 19 Mar 2023 22:01:16 +0000 (UTC) X-FDA: 80587019352.05.50904A9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 7411F140010 for ; Sun, 19 Mar 2023 22:01:14 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="BbRrG7/N"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679263274; 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=Qx4xDHpddo9ktihFE8x/+uQnfMmrp64WSopEcMQJvJI=; b=Y6Jzc4amr6KPNOKyqkPEkzW/Lk/qvYl/9UO/gRoVOw1jRJhgTQQotZqwJi0WfMXKz+HaNA TyuNTM4FCGLmVfoXsaLKjdtiS4BD4ki6mxvRuN5/MpWqKqCpULk7Sc4JP8A9TPUQaz14jR 51z6RvsnjbhQhDSa4ZyUEN+oVjQQOb4= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="BbRrG7/N"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679263274; a=rsa-sha256; cv=none; b=YqY/PNWfC3I3MtR0TIW1EpzfciISVHmYz31FzHUsC4z5qTipZStCIRIoUcyuVwO7VVSdLV tdf0QVBFnofvbth36aKrm4ybULcTfCi7yZwMZ26l/57Am2+jr0S4AH4Qs1Iey787YphrLf Fapp7poqLnvsc63mnCOtYS2UUNJ+U+w= 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 A3779611CD; Sun, 19 Mar 2023 22:01:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FEBEC4339B; Sun, 19 Mar 2023 22:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679263273; bh=PogP7wRngXQiUqmQnWvQozicSIVShAdtUNbeYC8wpS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BbRrG7/No3s+Wxn35WykZgqumgAtgA71gdQ5J12dxWsQy8T8UYZ0xOfDgvafCU0gU juKoeAAlcxDYKBZj7ANUaIDhkirDSSOn9GQHrhjrlBMAH632EHvpMIDKl/8mm6psIy x4E9jus7CN4xPRD62XXDkHy6wYmKhH/Rrkc6uE9Pi+lX/HLxmCNzPlOAfx4mQDCypg 0IKAP5boUvNjsBQkM3+RA309/oZJHntXBHJ5Xor9n1MvaJQAHrzbMA0bHab61TmasX l+NN5p1t3GG1PEDp6Sv0t7ytroVh+moRTc2smV8hZ2vuDxm+xP/p1KRVuZ4d2A2bEy 5G44pgtQ35qMQ== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , 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 14/15] mm: move vmalloc_init() declaration to mm/internal.h Date: Mon, 20 Mar 2023 00:00:07 +0200 Message-Id: <20230319220008.2138576-15-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319220008.2138576-1-rppt@kernel.org> References: <20230319220008.2138576-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 7411F140010 X-Stat-Signature: t8yz713mgbrhj71p3su6iucoaifuqppr X-HE-Tag: 1679263274-735520 X-HE-Meta: U2FsdGVkX19hU+9MFs3der7IMNgm4EtW3xhsXVg6cxiS7hwsxD2F0hJfy9H5eTciL5snRapm9+oUiopvM8qWMQ5RxORN0v0kEU+h48q+FGwaBchCp9Up26Sz80T10TvLz1K/hRHh3jkM+8hsxwSc6lHsWhroER9xJjXX6h29WEdNnNK/aecanhsP7pgQjHJfUOr3LiWfktgA8OL/3KgNZ3J0dUBlQa1iOhcsvzww2wfni+7kBoxkqqfZtXcJPXYOfRa3Jf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6Cw5nsSpTcniU63QV1yypuYcG6nZ0TdLCoXoNILetD0AghYUF16w== 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 --- 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 1be4278d7913..7e22137b4e86 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -895,9 +895,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)