Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3031983iob; Mon, 16 May 2022 11:29:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/JGhnWUOgwgYPUZ9GyyqzUrYg904kVP1RdKRiT4lobAHGCb+X97/HWvQSVNl2/f70xk8S X-Received: by 2002:a05:6402:4410:b0:427:ab6f:a39a with SMTP id y16-20020a056402441000b00427ab6fa39amr14521952eda.120.1652725742912; Mon, 16 May 2022 11:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652725742; cv=none; d=google.com; s=arc-20160816; b=QFkORKC+Ud67bOFfKrJwPTxfhnRnNrAScIZD2cNreOkQW9xC+wcONt6eGF17zJ9dTi DepzWs2pSQsXacTZSUNHT2ZqGF7BmFKr0nVPj2ClvTWOEI1ZB5sA3Lg0odBHzE7h2eAq hTCblSFc3Zka+xNA9PEegpWpm8e0lrcMhkoEovixy1bBlHYTVvSZSpKNICUxLD2ArBsK COmmBtZXfrwnb+JnA/bYRqLupVUxoA0YZb/hqzR+6Uvwm9K7mgunF8fw3ZTJyoav/3xS 7HpjGEZ707MpTo96tinlOqlFq8dLDjjr0rNP8pRpkYozTfAK93+Gobz5+GWntx8ZZd9c vs4g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oPBGi7F5jJb0tqRAd6y8zHdyZFG3Xn5fzK9wjWlYcqk=; b=aPI5Jxa+2F1AMq8V6ogY1N1LNQln9emm6YBPiOfYViYjRJEahnCkpDH5HR/YZ0Bpor QT61dB5ScpBlSHegTXcXFLGEg4SZz4PDe58U7h4d74+cjNntXz0OkyQ0CksM/Ar3r2Sm +hphNxKpGJPl79Cf9sprR0gNmmyU8jTXNS+9rNwuLpqVL06T4QXaQ4n6K/rl2+pcv6S4 w9miExBHyV9LuVJLSGetaQUV5lNSsI5qaS0YryDtxo/+MQNvGtRu2ws88ts1LrWbWKu6 u2cCEyOAigjgrJlkYROrq6raXRCK2wRvQ2wgiyHuKmo/9I4p9sxuCdb1bT8I7HUIk3N7 8cMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NJhtJktX; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a1709065ac500b006f380128f8dsi101050ejs.158.2022.05.16.11.28.36; Mon, 16 May 2022 11:29:02 -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=NJhtJktX; 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 S244080AbiEPOku (ORCPT + 99 others); Mon, 16 May 2022 10:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232814AbiEPOkp (ORCPT ); Mon, 16 May 2022 10:40:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A43B3D for ; Mon, 16 May 2022 07:40:42 -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 13411B81247 for ; Mon, 16 May 2022 14:40:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EC54C385AA; Mon, 16 May 2022 14:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652712039; bh=/LjZDM0tlNGi7ZrpCRvjcDx6kOF+zSUPdV+ox6kBvhU=; h=From:To:Cc:Subject:Date:From; b=NJhtJktX0yTMk0aDnZn0NnEzXf5PBQJ8E2hc3f+ckAZ4A00WEXhePXoXwowYigGfc XUoiWOmt6bZi0s9o2PrBxpl4JR51Jyg6komF7j1F+G74ud4ZYbsfyVqN3H3mZ6KPnN 3yZ5d9g/FoHguUTCvqH0MtbTiRN1z/nRi8B13sXbIntKjfaAD6xGez/Kvh07MPMXA1 T0rB8jf04krNXuZGCtUtgPdLGMprVpao3c9nEKboEZtytrqvf0m0S58W/Tk7Omjl/1 C3D/oL4trXu7FRzyqmuIFFdWqk6cSXv1QcNk4g8/RwLD0c3SnElMksJMyG0jTtKZeu 8RTutvHVklLPQ== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v2] riscv: mm: init: make pt_ops_set_[early|late|fixmap] static Date: Mon, 16 May 2022 22:32:04 +0800 Message-Id: <20220516143204.2603-1-jszhang@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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,T_SCC_BODY_TEXT_LINE 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 These three functions are only used in init.c, so make them static. Fix W=1 warnings like below: arch/riscv/mm/init.c:721:13: warning: no previous prototype for function 'pt_ops_set_early' [-Wmissing-prototypes] void __init pt_ops_set_early(void) ^ Signed-off-by: Jisheng Zhang Reviewed-by: Anup Patel --- since v1: - collect Reviewed-by tag - move out from the static key series as a separate patch arch/riscv/mm/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 05ed641a1134..5f3f26dd9f21 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -849,7 +849,7 @@ static void __init create_fdt_early_page_table(pgd_t *pgdir, uintptr_t dtb_pa) * MMU is not enabled, the page tables are allocated directly using * early_pmd/pud/p4d and the address returned is the physical one. */ -void __init pt_ops_set_early(void) +static void __init pt_ops_set_early(void) { pt_ops.alloc_pte = alloc_pte_early; pt_ops.get_pte_virt = get_pte_virt_early; @@ -871,7 +871,7 @@ void __init pt_ops_set_early(void) * Note that this is called with MMU disabled, hence kernel_mapping_pa_to_va, * but it will be used as described above. */ -void __init pt_ops_set_fixmap(void) +static void __init pt_ops_set_fixmap(void) { pt_ops.alloc_pte = kernel_mapping_pa_to_va((uintptr_t)alloc_pte_fixmap); pt_ops.get_pte_virt = kernel_mapping_pa_to_va((uintptr_t)get_pte_virt_fixmap); @@ -889,7 +889,7 @@ void __init pt_ops_set_fixmap(void) * MMU is enabled and page table setup is complete, so from now, we can use * generic page allocation functions to setup page table. */ -void __init pt_ops_set_late(void) +static void __init pt_ops_set_late(void) { pt_ops.alloc_pte = alloc_pte_late; pt_ops.get_pte_virt = get_pte_virt_late; -- 2.34.1