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: 72956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1909502wrt; Tue, 21 Mar 2023 10:28:32 -0700 (PDT) X-Google-Smtp-Source: AK7set9WomJWROeAAR/Lvxa7aCl60avFK1IWkKCiE00FIovpcKVKrtFrjo7IOktbd7SwWK2Bsyoz X-Received: by 2002:a05:6a20:4c12:b0:d8:d9a9:ab0b with SMTP id fm18-20020a056a204c1200b000d8d9a9ab0bmr3073925pzb.52.1679419712086; Tue, 21 Mar 2023 10:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679419712; cv=none; d=google.com; s=arc-20160816; b=hVq0S5VtQLN2UNb9mhuq1Q7EgbfCnzcmO8PwFod1CfRzmWlpEBNV/Z5J6f1+jzqFSD PYQCyHf28Coh2GrkfUhGHAdIVaCwO5Uj7rGM2iObD7WCSw8Emj94snN2CqOFtdjibVCa 9e4OCN1cfjVPd0zakMS12eG4iRDHWXPb0T5Hdc2ERDVakX2dwexvftqaHaNGiYHnt140 MiEY2oj3rzS3y6Al1Exy0K9+3nR0JCMxTRQiDr+0vs13KugOfycKGifY+mq/v10Tyc/u t5HNB2hurYGUNpwEA8mR/bukupUO0gNIycgmXMkqpWm5i2aYLpfWzKQA27rUhmsKtczH 82Qg== 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=exMOKirvI5JGq9PkpxuZWvG3dN5dcu17Uy4qDIwBrtA=; b=raRsi2xt6X2R7STlgd7IQIU3DUVUTEuoO73pe4f0hvHh1zQZ+QbsYSHG7uoRDxYZTm k+a4N6CRkLHCcG/cBo0+bhcMTFYahjhHDk1o9VO5X1m9OJt+apofU2/4mgPccneOKrWx 479Y9mGVC4Jbs3lXKlJFhD6VTRXySE+mIocLscSyuu2BoMVI9YTfAlCVDdozXfQ/pO4Y PCy/NHv4f9/+TEnYf5BXPKSpJ2JfcIhY4p37QxuawOQsuyy0aiYAkDiYMiGBgdPhS3a0 THdOu7Fel5WbrFH9zTP5hGhODHhgkXJcqziJki4nYzs/ceQBA3p9n9uh1gyLRXM5dV+x 5tVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iP13+nPF; 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 y23-20020aa79437000000b005a91144267asi13388921pfo.247.2023.03.21.10.28.17; Tue, 21 Mar 2023 10:28:32 -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=iP13+nPF; 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 S230366AbjCURIZ (ORCPT + 99 others); Tue, 21 Mar 2023 13:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjCURIL (ORCPT ); Tue, 21 Mar 2023 13:08:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E846053716; Tue, 21 Mar 2023 10:07:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id 29775B818FC; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1760999204136260043?= X-GMAIL-MSGID: =?utf-8?q?1760999204136260043?= 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)