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: 71912 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp902106wrt; Sun, 19 Mar 2023 15:31:41 -0700 (PDT) X-Google-Smtp-Source: AK7set/s9RakbDzzAOgya51A2vXCIZVY6u0DM+QdaeDFLu4GFTrluZEFUggKZ52dkNND4+iuL2zC X-Received: by 2002:a17:902:e74d:b0:19e:6bc5:8769 with SMTP id p13-20020a170902e74d00b0019e6bc58769mr17803273plf.69.1679265101315; Sun, 19 Mar 2023 15:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679265101; cv=none; d=google.com; s=arc-20160816; b=Gi6rgaRf6KxRfK0+fA58mm0aWP/5PVyIFzwpB0GQ3IQkj61gk7h4ZfHYsrwk2x5iwB jsXUw4jCLbhN66lX8WLnecpMYpYfVC/joWSY6DDtRSk4d9zwCmXg4x4vcYeihk/Pno3f y5IjMcnSlQ+JKCSTI4gHUuD9FPhKEndNKaY07WQuF5vd5bRQF7AqUFqJGlkwddt1Ilh2 6oP3AVCflsQgmQuGrn+G1NL8hqW3dgDBINF+vC2Ssh5fFj6FXHVoLa1H3DTWgrUwyYEd 4Haw05Ah3tJeDaSlmP+fx3K+fhQCf2AykIGheCH4OpuDytoMZqW4ctia73mkVtErS2Jb upoA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qx4xDHpddo9ktihFE8x/+uQnfMmrp64WSopEcMQJvJI=; b=rM59IdRHqDBRZ7Wy666h1pfAFbj/9ifYuSsMU+0v/5JeFAZzIc+JnKi0Z4NKeemIdD DYb0+z42TnFwHaLO1nGdk/X2wZG1t+jR9r+iyqUq0Db69mk4qgmX9/+Q27SNI0KnQIyW u8+ePSEx/pzO8Hzbj1t0oJYK4dFrAPxpW3fAqlPFCOKs19SaH5KyKcrAdDWJ6iBh+zcv 1TdhHx3j5UWspyRzirRvjerYdnkQjzAWvN2F1jGwqc49t1qiaH3R5tYxjI/ao85ZVklB cfp0kxHV2kHdrKJ7meuq/2gbG5tOF375rCpC0GZvd3YLaZoyz9P8smlD1hbAj8Z8p/0W C2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BbRrG7/N"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a170902e80800b001a05d52469dsi6573077plg.361.2023.03.19.15.31.29; Sun, 19 Mar 2023 15:31:41 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BbRrG7/N"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbjCSWCe (ORCPT + 99 others); Sun, 19 Mar 2023 18:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbjCSWB7 (ORCPT ); Sun, 19 Mar 2023 18:01:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2620F1EBF8; Sun, 19 Mar 2023 15:01:14 -0700 (PDT) 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 9B7B8611A7; 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1760837082451326524?= X-GMAIL-MSGID: =?utf-8?q?1760837082451326524?= 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)