Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1664752ioo; Sun, 22 May 2022 23:34:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU7qGSx35nFtGTI3dcFbLnv90A6pskzzkJOqEW5yqCV3rW+BSBafD3Sa7nqWL+9VrwX9ly X-Received: by 2002:a63:1360:0:b0:3fa:7e30:e75f with SMTP id 32-20020a631360000000b003fa7e30e75fmr913932pgt.50.1653287692774; Sun, 22 May 2022 23:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287692; cv=none; d=google.com; s=arc-20160816; b=iLU40f/ZqMqyAJGTitaqf0ODCOOBKUZgG0KqWHOpJHb5lCcHxRmeucYs3nB8yl+NAL RBx1IuBiRpeLLH5WoOtb0QSzgn3NloQHGRMHOXKgjwdRPfq6xV2R0DTCTzjRTo11h0zF 4mXug6FN5xAmHSfroOxh6dIDOAXNuBTiyeW+3E7vEXnHb/otYHBMqI+T4bFyHyxHTuGx eNNwSg5I4PBCnEzf8jgdMLgu20mRLyZ22i7qhmDy5GRkP6dg0MknmPj54DA8Fie22Mut h5SOMNW83dH/5gtrdG2Lq5Qpyu2HMn4blzgj2Jr5txbyPdZ1yj/iekCoz6MQFlgzQkfQ rV5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Znw7LJlbn1r+wdsACS1F0N9XbG/RiiVDOXyDXO5CsQE=; b=mDqRoWQvEsVsgY1/0XzyGJsEYlkkWuVh5B1QtesAADc8C3GkYgldiq4LiybiD2sFuF AyZafbjPer42QSyawsXdDy7NKJT0LTxPXx+ZlVH9ATPiDcplCrITjta6RMCqIaSTyoq4 dMw45C3p37v7q5615Swj1ozPuxRAWb95BjZZ5h3bbTcXcVk/me4laPWsjMPU9GBoqrsW CaaqkE/FykYzfft8ktUGVqxCfnqSol1ZJiv5v3jrOOJDn8BGpPLchqEBB5eUDxk2+4LF 3DhNJ1DYeR43wCz7b5iMJJ+Oiy8tT7QKlaicKu5UEPCxOlginPoXd7lB8ekfU16vdm+W TL8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=oI5Lsg53; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 24-20020a630f58000000b003aa619920a1si8202050pgp.527.2022.05.22.23.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:34:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=oI5Lsg53; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 856893B00E; Sun, 22 May 2022 23:09:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241306AbiEVIVf (ORCPT + 99 others); Sun, 22 May 2022 04:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbiEVIVe (ORCPT ); Sun, 22 May 2022 04:21:34 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A9C51B79B for ; Sun, 22 May 2022 01:21:33 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-2ff1ed64f82so121805247b3.1 for ; Sun, 22 May 2022 01:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Znw7LJlbn1r+wdsACS1F0N9XbG/RiiVDOXyDXO5CsQE=; b=oI5Lsg53Bix9/s98Dk6RwCbWEJtDNIO6hHRev5nvmxWVtypqgkp09ZLZmxl7WuChR8 LdcdeJwLgDHQzEW1HEq/uwiQpgs5NECaDSRup/YaGHZ6YCWvsXWwVsF/PB/1Oka6zHVa 0F5wghO4TAWAr6ItAuRaO3TLHmMzJKFmnWskQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Znw7LJlbn1r+wdsACS1F0N9XbG/RiiVDOXyDXO5CsQE=; b=yAbMdq3jErelaPV7l7D+nv/3i1U5TUbiN7CPVxgJvqjnGbW3AcQeSj4c5GPkntiBx+ qbGw62olCBciGagLvAub7XcnHKZFn4M/k/SgpZIGTq/5lEEKyUaJ289SZCWQR6iz9UPU uGuB07J1Z6fGmBRHQ+H0fwDtTsySNHcPDgb3YJOTaUz9OSY5olkOoXpHZMRTImqsmeIW 36u6C5jDRaRRHVDoGlrMXyKxb5QHv7Y1NjYe4SkW37WLKL//ziWvayU/pTcoZleVTYdp mwGzc+5PS2beR/2wOXA78zLoA/YIIGaUT6v+0yCopqz31f4sWo4etTYQQMBTyqrGdl81 CvKw== X-Gm-Message-State: AOAM533ezYm7S/l4OSCeRyf5Wjg43nbTcBIFZ6yXaR3BpwJwxxckybrQ eEOcib4+l0FSWi+EepqQWIYQlKOxxVidmcEkodau X-Received: by 2002:a81:8494:0:b0:2fe:ff73:cdb7 with SMTP id u142-20020a818494000000b002feff73cdb7mr17834758ywf.373.1653207692599; Sun, 22 May 2022 01:21:32 -0700 (PDT) MIME-Version: 1.0 References: <20220516143204.2603-1-jszhang@kernel.org> In-Reply-To: <20220516143204.2603-1-jszhang@kernel.org> From: Atish Patra Date: Sun, 22 May 2022 01:21:21 -0700 Message-ID: Subject: Re: [PATCH v2] riscv: mm: init: make pt_ops_set_[early|late|fixmap] static To: Jisheng Zhang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv , "linux-kernel@vger.kernel.org List" , Anup Patel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, May 16, 2022 at 7:41 AM Jisheng Zhang wrote: > > 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 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv Reviewed-by: Atish Patra -- Regards, Atish