Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc: xmon: remove unused variables

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 <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230809131024.2039647-2-arnd@kernel.org

authored by

Arnd Bergmann and committed by
Michael Ellerman
ef73dcaa 0f7ce21a

+2 -6
+2 -6
arch/powerpc/xmon/xmon.c
··· 3828 3828 #ifdef CONFIG_PPC_BOOK3E_64 3829 3829 static void dump_tlb_book3e(void) 3830 3830 { 3831 - u32 mmucfg, pidmask, lpidmask; 3831 + u32 mmucfg; 3832 3832 u64 ramask; 3833 - int i, tlb, ntlbs, pidsz, lpidsz, rasz, lrat = 0; 3833 + int i, tlb, ntlbs, pidsz, lpidsz, rasz; 3834 3834 int mmu_version; 3835 3835 static const char *pgsz_names[] = { 3836 3836 " 1K", ··· 3874 3874 pidsz = ((mmucfg >> 6) & 0x1f) + 1; 3875 3875 lpidsz = (mmucfg >> 24) & 0xf; 3876 3876 rasz = (mmucfg >> 16) & 0x7f; 3877 - if ((mmu_version > 1) && (mmucfg & 0x10000)) 3878 - lrat = 1; 3879 3877 printf("Book3E MMU MAV=%d.0,%d TLBs,%d-bit PID,%d-bit LPID,%d-bit RA\n", 3880 3878 mmu_version, ntlbs, pidsz, lpidsz, rasz); 3881 - pidmask = (1ul << pidsz) - 1; 3882 - lpidmask = (1ul << lpidsz) - 1; 3883 3879 ramask = (1ull << rasz) - 1; 3884 3880 3885 3881 for (tlb = 0; tlb < ntlbs; tlb++) {