Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp522404rwr; Wed, 26 Apr 2023 02:40:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60LQm4ujTFwdzkW4iOWGD0rE6kwfgBCpUI3XtGX8RakJ/fQkWhgto+fL0KJZe8YAVFJ32B X-Received: by 2002:a17:902:e5d0:b0:1a9:91d7:ba2 with SMTP id u16-20020a170902e5d000b001a991d70ba2mr5555682plf.48.1682502038064; Wed, 26 Apr 2023 02:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682502038; cv=none; d=google.com; s=arc-20160816; b=raDBuojjNy8Q84OmBhbSxQxjAQoJva8qqJtL0MeoBspBoHivVpJ5FJDrI8amsofvWj dzZpMDGn7kDWRfeRjpmGFzbW6P9O1dZ29KDKTTmw/6bdUGITqpve4kb/ARxFZVP7qz25 WGd3WNzx10wL2EIAnmExZ/60ofM+HT7iIIprH5PGhS8dyw5GtD+f0fmWE9SlxOeGugjR A1QuJQ664hDD+b1DWdc4cOJU2aa+f15TY7X2X/ArrFTE7PAK6STL+obPMUlpEzIP4iem W13oT5/cs5O5b1TMOnP4axBniL/HqBwPF62ugdYJ323xIf7rnWAQB6H8EJ92vmlSm0C2 +Hng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=In4LyxnyfVq1E/QeP4R5ZziEku9kubTwaewMMzPdbbs=; b=aP7uFpDCANXJh2v4SVhv26AM06j7zUNFAfgNKED5pwqi484K/35bV1qv9mH3fRzIDs nAGPRyPF87va0RJEvnrCcUZBKpOYRShHLUiXf+v7shFxSEL3qL4KG6yho/Nnt8yezfEp 2K690ay+Xa8WJ8XTNROJNpvjWOmxX61uDX4S1ACkPvMoueWhzYUCi9xT77+gOQ0pTOxp YVfa13ROkkGd3Xp+pbRFcYAcYVstkzCZjvsCfQlMsizOcjHxFZKPZj+hItMNhVPWM1co Yk5ed4lLKLl2xNVp7R1AETKVPateeVuqhtTxS/X2uROkZmC4BGtyVeDDPBff1/9GiSuG Ogzg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a170902d51100b001a05a78f952si18286671plg.272.2023.04.26.02.40.26; Wed, 26 Apr 2023 02:40:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240259AbjDZJbu (ORCPT + 99 others); Wed, 26 Apr 2023 05:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240262AbjDZJbq (ORCPT ); Wed, 26 Apr 2023 05:31:46 -0400 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BEB7E7 for ; Wed, 26 Apr 2023 02:31:45 -0700 (PDT) Received: (Authenticated sender: alex@ghiti.fr) by mail.gandi.net (Postfix) with ESMTPSA id 30DC1240004; Wed, 26 Apr 2023 09:31:35 +0000 (UTC) Message-ID: <83540cb1-0c9b-f572-849a-cb100437d049@ghiti.fr> Date: Wed, 26 Apr 2023 11:31:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH -fixes] riscv: mm: remove redundant parameter of create_fdt_early_page_table Content-Language: en-US To: Song Shuai , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alexghiti@rivosinc.com, heiko@sntech.de, conor.dooley@microchip.com, guoren@kernel.org, anshuman.khandual@arm.com, mick@ics.forth.gr, samuel@sholland.org Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230426091511.674496-1-suagrfillet@gmail.com> From: Alexandre Ghiti In-Reply-To: <20230426091511.674496-1-suagrfillet@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,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 Hi Song, On 4/26/23 11:15, Song Shuai wrote: > create_fdt_early_page_table() explicitly uses early_pg_dir for > 32-bit ftb mapping and the pgdir parameter is redundant here. s/ftb/fdt > So remove it and its caller. > > Signed-off-by: Song Shuai > --- > arch/riscv/mm/init.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index 0f14f4a8d179..6ebb75a9a6b9 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -843,8 +843,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early) > * this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR > * entry. > */ > -static void __init create_fdt_early_page_table(pgd_t *pgdir, > - uintptr_t fix_fdt_va, > +static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va, > uintptr_t dtb_pa) > { > uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); > @@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa) > create_kernel_page_table(early_pg_dir, true); > > /* Setup early mapping for FDT early scan */ > - create_fdt_early_page_table(early_pg_dir, > - __fix_to_virt(FIX_FDT), dtb_pa); > + create_fdt_early_page_table(__fix_to_virt(FIX_FDT), dtb_pa); > > /* > * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap You're right, it was never used, weird the compiler never complained. And the function name clearly indicates it is for early_pg_dir so no need for this parameter. You can add: Reviewed-by: Alexandre Ghiti Thanks! Alex