Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5589722rwb; Wed, 9 Aug 2023 06:32:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IER6Wfx2yb077rAo0BIC1lR0eFwE8kST7lFPPammNRLGej36Do5ITD45y+T+IJix+12210Q X-Received: by 2002:a2e:8893:0:b0:2b6:a5df:c7fb with SMTP id k19-20020a2e8893000000b002b6a5dfc7fbmr1781806lji.26.1691587939817; Wed, 09 Aug 2023 06:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691587939; cv=none; d=google.com; s=arc-20160816; b=oGVgLWehriU7y1w5uKUXYTnlJN08GsuIx5AQcbw/kC/fkDTQjOsWmn9+3r95nXYI0Z BBx1F3g6bv+mUzlHmaYl6xrtXNbNMfQ1cCbwO/iOfNPLRfUTUh7+qL9HnV0beHP+5hah +nYtIZhXv6RKEvnE86T1WwFWCHFpAocUtr/rs9AcLEMiq9/wrH/an3vdA/pDHn+0nZqQ AEfGv9LReFr8Ph339mHZ509Y790Ut7fRELW4Cu+4y6vWOXs7NJWIqd9+dt2Nc3FRfm7X 1YaSo/ZNp3NKLOoQNF0X0Uyc1n1OckeAlqI9wTPe7tdngSDAoBU2WVxBU4Jr+paPfc3Q QQqA== 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=hH20oypgw+Pb1UpRch0VUBFGwJniDDoVMoMsnI8HuSk=; fh=o24T5Iew65uh2YGpYAtPi0LL6gE7TcQpHtz2htUcMOc=; b=leRFgYx4BLItKJM8aXe1s27cMzRBoj4WjGWXNz/CutFi7pIIXcV+PzFl+JrxDCgk1k hZhq1rVgY5spf+tJ3w6DeEkLpKHMCCOZo2SYCiFFa4zrRHHqgpRSV06lLKJJYyIDsDfM I520gjsLvsFpmMwph5cawwozqv9s04B/db9TBcMbcvzq0kpWq0qcCreSZSJIX8wP7DDt lqo/acr5ZdiYLomayJ/uNZIUKc1wN7D+cEq8+Q5UYCY6NfqJGCpVJmaM1BFne2Ku/NsH FNJzEbsGySg7iY6XMSWGhiY0zVIz0h31T86kUjoDg+CD7NWedfXHbr+y/Dy8q5FaL1FK BfYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZUUyCFd; 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 jz18-20020a170906bb1200b0099bb83fdfc6si9629196ejb.408.2023.08.09.06.31.53; Wed, 09 Aug 2023 06:32:19 -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=kZUUyCFd; 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 S230265AbjHINKo (ORCPT + 99 others); Wed, 9 Aug 2023 09:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232037AbjHINKo (ORCPT ); Wed, 9 Aug 2023 09:10:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8AE81FF9 for ; Wed, 9 Aug 2023 06:10:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E8EE63A0B for ; Wed, 9 Aug 2023 13:10:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D17DC433C7; Wed, 9 Aug 2023 13:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691586642; bh=8yNyOO+2QZkgnoSSVDnys8vhbwWKyMOWhNjFppxAbQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZUUyCFdjZy8W9ni44xJMyzler9r/pp5Xrd/1pc+MWEcwzhHd82RLr2naHrtvDvvX Wk0gUHLaQgg9daasROVWAbMjzfaqJBQ8jSbf+hxlblbsejZiYoF0BTCEXaQY1PRj/Y ZN+vAwprYyfK2B0J99Eh18n8hPGYgzdbMKVpEDrAbrkVr5xBu5uZJrhR+UI/fRwCKd PstLGmVdmMq7b24IdRcaNcthcPSuTg+shBJSFEcBM33SWF/VfVqzn26mNKvfrI7EvI YE9nFuLz+w6UYjJD9zAEvS70Y6uez3lfpE/ADmcidjRQa5/AOnhO7pCyZckquMtbqN HV3cPu9jG0XPQ== From: Arnd Bergmann To: Michael Ellerman , Benjamin Herrenschmidt Cc: Arnd Bergmann , Nicholas Piggin , Christophe Leroy , Andrew Morton , Nathan Lynch , "Gustavo A. R. Silva" , Hugh Dickins , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] powerpc: xmon: remove unused variables Date: Wed, 9 Aug 2023 15:10:09 +0200 Message-Id: <20230809131024.2039647-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230809131024.2039647-1-arnd@kernel.org> References: <20230809131024.2039647-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 From: Arnd Bergmann Randconfig testing with W=1 showed up these warnings that I'd like to enable by default: arch/powerpc/xmon/xmon.c: In function 'dump_tlb_book3e': arch/powerpc/xmon/xmon.c:3833:42: error: variable 'lrat' set but not used [-Werror=unused-but-set-variable] 3833 | int i, tlb, ntlbs, pidsz, lpidsz, rasz, lrat = 0; | ^~~~ arch/powerpc/xmon/xmon.c:3831:23: error: variable 'lpidmask' set but not used [-Werror=unused-but-set-variable] 3831 | u32 mmucfg, pidmask, lpidmask; | ^~~~~~~~ arch/powerpc/xmon/xmon.c:3831:14: error: variable 'pidmask' set but not used [-Werror=unused-but-set-variable] 3831 | u32 mmucfg, pidmask, lpidmask; | ^~~~~~~ Just remove these as they have been unused since the code was added in 2010. Fixes: 03247157f7391 ("powerpc/book3e: Add TLB dump in xmon for Book3E") Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 9e12b75850d75..e35f13842ce15 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -3828,9 +3828,9 @@ static void dump_tlb_44x(void) #ifdef CONFIG_PPC_BOOK3E_64 static void dump_tlb_book3e(void) { - u32 mmucfg, pidmask, lpidmask; + u32 mmucfg; u64 ramask; - int i, tlb, ntlbs, pidsz, lpidsz, rasz, lrat = 0; + int i, tlb, ntlbs, pidsz, lpidsz, rasz; int mmu_version; static const char *pgsz_names[] = { " 1K", @@ -3874,12 +3874,8 @@ static void dump_tlb_book3e(void) pidsz = ((mmucfg >> 6) & 0x1f) + 1; lpidsz = (mmucfg >> 24) & 0xf; rasz = (mmucfg >> 16) & 0x7f; - if ((mmu_version > 1) && (mmucfg & 0x10000)) - lrat = 1; printf("Book3E MMU MAV=%d.0,%d TLBs,%d-bit PID,%d-bit LPID,%d-bit RA\n", mmu_version, ntlbs, pidsz, lpidsz, rasz); - pidmask = (1ul << pidsz) - 1; - lpidmask = (1ul << lpidsz) - 1; ramask = (1ull << rasz) - 1; for (tlb = 0; tlb < ntlbs; tlb++) { -- 2.39.2