Message ID | 20230519131311.391960-1-alexghiti@rivosinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1228747vqo; Fri, 19 May 2023 06:18:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nyvWJEn2UnnzrdsqbQF1nC09AQxL6HPpMUBoY2SbBwGhx0klpx4OZZtGrYGB8ax325iDd X-Received: by 2002:a05:6a20:7345:b0:100:24d7:545b with SMTP id v5-20020a056a20734500b0010024d7545bmr2266043pzc.10.1684502313618; Fri, 19 May 2023 06:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684502313; cv=none; d=google.com; s=arc-20160816; b=daz6UejsjRzKcE3gNVnm3Nqf3Uh3IWeLH2kuBBqpFAfdH+kurWPM854AXH3UjSkNEl vhC+BcQXItEvUXX2dIjYPgTj28sPOQd9TO4Mjw4+4prYYltVhlAa9nVyQ3nz9PKIWeRL Gg3++QWk4d7ei48v2uDjsbTTJjxPwPnWT05WgcX5CyttgS7J4VFjvFJLxueQzMqKGtNI G07bDg6F+YsiDkdB3bfjzkFBdU4/V17GsVtsqlYpK06tidIqMWv4MuUmG5OKad1kW6xO OQNvrM7+5rgL3RP/df6V6nTbEn+xAWFmbxp4ax/z4OOFxEMS7LZ5zSusyJmZETotuvH9 1wOg== 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:to:from:dkim-signature; bh=VubzrgCD2ViwjmO3PZokr9/4IFGa31fvJ3BrWREI83s=; b=kZEaOfSCQNwox1c0818ver97N0vjKCDYscK/rn/VIiHcnM0KLz0cUSw4pvX8pVSmaY QjITI9Z/NPlwY6NSj6Zp3UsNkp4mhgURFWeH4NSC5f/HeDNIoDgKfI0FaRZcSMayg/rW GsLiy1SKipYKSwXYd6ZZhIvzRI1+I8tSB+LR+lVmUjiwiYFxxexQ1IBGYt1Il+m1QEfD ltkIxb+iCiqnn5gWq8//r3dhp1fZcO80NTiBB/pPBeruzWFbmBJd2pN6mWBnN+BI1BwK ygpJXsIxOzALCL9/AgrcW6YMGzWwFbJgXplg3N5szyf3P+DiesBaAXttnBbIGVyWBHSK SuqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=esXtjrha; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020aa79468000000b0063b78126397si4010727pfq.230.2023.05.19.06.18.21; Fri, 19 May 2023 06:18:33 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=esXtjrha; 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 S230189AbjESNNS (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Fri, 19 May 2023 09:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjESNNQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 19 May 2023 09:13:16 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689309D for <linux-kernel@vger.kernel.org>; Fri, 19 May 2023 06:13:15 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f49bf0223cso31426865e9.1 for <linux-kernel@vger.kernel.org>; Fri, 19 May 2023 06:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1684501994; x=1687093994; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=VubzrgCD2ViwjmO3PZokr9/4IFGa31fvJ3BrWREI83s=; b=esXtjrha/93GEYue04kr1iYA2b8go6OK835+hPZVPvEThh/VfdYosW1AKs6s7hktoz zPIWkQzeaZDU4xwV3VdId7N9gVpqccbTO7zC/RErqlEwPuKSoMvodIaRLgajJAToThvl mpeHBk17ZiOWelgQekvt6juGQE/6lzDTaqrkzeECodBD6GZ8GnzxJn27gUKVKoeubU4V mNgCSKA/qbNtO+hDlKnCffMbtEKSGTiUPbfp6PY26ZMGIX8ddHFAg7qLb0SRsJgiCgRS ILjuxOOl9WrTrI9+GlwbbbjbCfVcSZqLwZqunDKzO2dy15wm+o3nNe71h2zC3yHQDvi9 pH2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684501994; x=1687093994; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VubzrgCD2ViwjmO3PZokr9/4IFGa31fvJ3BrWREI83s=; b=eDD4YE1XJMpwuloLwM04LgJYQ80PuDbTa9W2BJbVALwwrqAEaY2yW58uVHwj3z5+ND msN4puUz+A17tRbTlLpNkJPClJt6pJkHrZvs01R3Qb/Na/+KuLwQzK/FA5HkjDGIyxxJ O8IpuMCc2KmqtCItue9Pe+ZGTjTgDPwhPQZgKTQyww20H6M6QpULEKPdkOoSZbXJ2k/0 1fhiM63R14nysordoz3MnOVO0FT74Bprz37xLBkVdRLA5yP5EMlyrYKPUbpE/J8tniUF TwlusYIpZQgQ8GMFWfeysKOPMWmvtMUgtOLmFbSvzz4C9qORx212x5uy7WgQpc8ehPn5 FUvA== X-Gm-Message-State: AC+VfDxG8Tce1dMfvXa5pnWC1lMfbOzCzUFahfuhQ2AKG+4M7akjj95+ XcvpLR2H6l9DhN8Vbkt3aKgKYw== X-Received: by 2002:a1c:ed0c:0:b0:3f4:2506:3d58 with SMTP id l12-20020a1ced0c000000b003f425063d58mr1278568wmh.23.1684501993851; Fri, 19 May 2023 06:13:13 -0700 (PDT) Received: from alex-rivos.home (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id n3-20020adff083000000b00304b5b2f5ffsm5282580wro.53.2023.05.19.06.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:13:13 -0700 (PDT) From: Alexandre Ghiti <alexghiti@rivosinc.com> To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Conor Dooley <conor.dooley@microchip.com>, Alexandre Ghiti <alexghiti@rivosinc.com>, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set Date: Fri, 19 May 2023 15:13:11 +0200 Message-Id: <20230519131311.391960-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766328697952654683?= X-GMAIL-MSGID: =?utf-8?q?1766328697952654683?= |
Series |
[-fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set
|
|
Commit Message
Alexandre Ghiti
May 19, 2023, 1:13 p.m. UTC
commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap
region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa
variable definition in create_fdt_early_page_table(), so move it back to
its right place to quiet the following warning:
../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’:
../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable]
925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
arch/riscv/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, May 19, 2023 at 03:13:11PM +0200, Alexandre Ghiti wrote: > commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap > region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa > variable definition in create_fdt_early_page_table(), so move it back to > its right place to quiet the following warning: > > ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’: > ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable] > 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); > > Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region") > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Thanks Alex.
Hello: This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <palmer@rivosinc.com>: On Fri, 19 May 2023 15:13:11 +0200 you wrote: > commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap > region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa > variable definition in create_fdt_early_page_table(), so move it back to > its right place to quiet the following warning: > > ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’: > ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable] > 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); > > [...] Here is the summary with links: - [-fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set https://git.kernel.org/riscv/c/33d418da6f47 You are awesome, thank you!
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 747e5b1ef02d..c6bb966e4123 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -922,9 +922,9 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early) static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va, uintptr_t dtb_pa) { +#ifndef CONFIG_BUILTIN_DTB uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); -#ifndef CONFIG_BUILTIN_DTB /* Make sure the fdt fixmap address is always aligned on PMD size */ BUILD_BUG_ON(FIX_FDT % (PMD_SIZE / PAGE_SIZE));