git: da8b23852960 - main - powerpc: Remove unused variables.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 12 Apr 2022 21:59:25 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=da8b23852960c60a52093474f2d2355bee3d340d

commit da8b23852960c60a52093474f2d2355bee3d340d
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-12 21:58:58 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-12 21:58:58 +0000

    powerpc: Remove unused variables.
---
 sys/powerpc/aim/mmu_oea64.c   | 2 --
 sys/powerpc/powerpc/machdep.c | 8 +-------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 9e2bddb01344..a066511a863e 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -3430,7 +3430,6 @@ moea64_page_array_startup(long pages)
 	vm_paddr_t pa;
 	vm_offset_t va, vm_page_base;
 	vm_size_t needed, size;
-	long page;
 	int domain;
 	int i;
 
@@ -3447,7 +3446,6 @@ moea64_page_array_startup(long pages)
 		return;
 	}
 
-	page = 0;
 	for (i = 0; i < MAXMEMDOM; i++)
 		dom_pages[i] = 0;
 
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 2dc9a3e9d549..84c3db924f68 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -271,7 +271,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp,
 	bool		symbols_provided = false;
 	vm_offset_t ksym_start;
 	vm_offset_t ksym_end;
-	vm_offset_t ksym_sz;
 #endif
 
 	/* First guess at start/end kernel positions */
@@ -323,7 +322,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp,
 		 */
 		char *envp = NULL;
 		uintptr_t md_offset = 0;
-		vm_paddr_t kernelstartphys, kernelendphys;
+		vm_paddr_t kernelendphys;
 
 #ifdef AIM
 		if ((uintptr_t)&powerpc_init > DMAP_BASE_ADDRESS)
@@ -350,8 +349,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp,
 				if (fdt != 0)
 					fdt += md_offset;
 			}
-			kernelstartphys = MD_FETCH(kmdp, MODINFO_ADDR,
-			    vm_offset_t);
 			/* kernelstartphys is already relocated. */
 			kernelendphys = MD_FETCH(kmdp, MODINFOMD_KERNEND,
 			    vm_offset_t);
@@ -361,7 +358,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp,
 #ifdef DDB
 			ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
 			ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
-			ksym_sz = *(Elf_Size*)ksym_start;
 
 			db_fetch_ksymtab(ksym_start, ksym_end, md_offset);
 			/* Symbols provided by loader. */
@@ -533,7 +529,6 @@ load_external_symtab(void) {
 	int i;
 
 	Elf_Ehdr *ehdr;
-	Elf_Phdr *phdr;
 	Elf_Shdr *shdr;
 
 	vm_offset_t ksym_start, ksym_sz, kstr_start, kstr_sz,
@@ -589,7 +584,6 @@ load_external_symtab(void) {
 	kernelimg = (u_char *)pmap_early_io_map(start, (end - start));
 #endif
 
-	phdr = (Elf_Phdr *)(kernelimg + ehdr->e_phoff);
 	shdr = (Elf_Shdr *)(kernelimg + ehdr->e_shoff);
 
 	ksym_start = 0;